WpPlugin::Vulnerable specs
This commit is contained in:
@@ -2,17 +2,19 @@
|
||||
|
||||
shared_examples 'WpItem::Vulnerable' do
|
||||
|
||||
# 3 variables have to be set in the described class or subject:
|
||||
# let(:vulns_file) { }
|
||||
# let(:vulns_xpath) { }
|
||||
# let(:expected_vulns) { } The expected Vulnerabilities when using vulns_file and vulns_xpath
|
||||
# 2 variables have to be set in the described class or subject:
|
||||
# let(:vulns_file) { }
|
||||
# let(:expected_vulns) { } The expected Vulnerabilities when using vulns_file and vulns_xpath
|
||||
#
|
||||
# 1 variable is optional, used if supplied, otherwise subject.vulns_xpath is used
|
||||
# let(:vulns_xpath) { }
|
||||
|
||||
describe '#vulnerabilities' do
|
||||
let(:empty_file) { MODELS_FIXTURES + '/wp_item/vulnerable/empty.xml' }
|
||||
|
||||
after do
|
||||
subject.vulns_file = @vulns_file
|
||||
subject.vulns_xpath = vulns_xpath
|
||||
subject.vulns_xpath = vulns_xpath if defined?(vulns_xpath)
|
||||
|
||||
result = subject.vulnerabilities
|
||||
result.should be_a Vulnerabilities
|
||||
|
||||
Reference in New Issue
Block a user