Improves plugin/theme version detection by looking at the "Version: "- Fixes #732

This commit is contained in:
erwanlr
2014-12-05 18:11:49 +01:00
parent a8c55ddee3
commit c24ed707ef
3 changed files with 22 additions and 4 deletions

View File

@@ -27,9 +27,18 @@ shared_examples 'WpItem::Versionable' do
end
context 'when the version is valid' do
it 'returns it' do
@file = '/simple-login-lockdown-0.4.txt'
@expected = '0.4'
context 'when leaked from the stable tag' do
it 'returns it' do
@file = '/simple-login-lockdown-0.4.txt'
@expected = '0.4'
end
end
context 'when leaked from the version' do
it 'returns it' do
@file = '/wp-photo-plus-5.1.15.txt'
@expected = '5.1.15'
end
end
end
end