WpVersion::Vulnerable specs

This commit is contained in:
erwanlr
2013-03-28 15:33:35 +01:00
parent ec9eadda8e
commit a7bd5044c4
4 changed files with 56 additions and 2 deletions

View File

@@ -0,0 +1,26 @@
# encoding: UTF-8
shared_examples 'WpVersion::Vulnerable' do
describe '#vulns_file' do
after { subject.vulns_file.should == @expected }
context 'when :vulns_file is no set' do
it 'returns the default one' do
@expected = WP_VULNS_FILE
end
end
context 'when the :vulns_file is already set' do
it 'returns it' do
@expected = 'test.xml'
subject.vulns_file = @expected
end
end
end
describe '#vulns_xpath' do
its(:vulns_xpath) { should == "//wordpress[@version='1.2']/vulnerability" }
end
end