From 9c0ce2a1cdc2a029e940a5a89a411e16011d4a29 Mon Sep 17 00:00:00 2001 From: Christian Mehlmauer Date: Mon, 6 May 2013 22:47:20 +0200 Subject: [PATCH] fix rspecs #179 --- lib/common/models/vulnerability.rb | 2 +- spec/shared_examples/wp_item_vulnerable.rb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/common/models/vulnerability.rb b/lib/common/models/vulnerability.rb index 83b15733..1fb412a7 100755 --- a/lib/common/models/vulnerability.rb +++ b/lib/common/models/vulnerability.rb @@ -15,7 +15,7 @@ class Vulnerability # @param [ String ] fixed_in Vuln fixed in Version X # # @return [ Vulnerability ] - def initialize(title, type, references, metasploit_modules = [], fixed_in) + def initialize(title, type, references, metasploit_modules = [], fixed_in = '') @title = title @type = type @references = references diff --git a/spec/shared_examples/wp_item_vulnerable.rb b/spec/shared_examples/wp_item_vulnerable.rb index 0dbf17f8..0fb31b98 100644 --- a/spec/shared_examples/wp_item_vulnerable.rb +++ b/spec/shared_examples/wp_item_vulnerable.rb @@ -12,6 +12,10 @@ shared_examples 'WpItem::Vulnerable' do describe '#vulnerabilities' do let(:empty_file) { MODELS_FIXTURES + '/wp_item/vulnerable/empty.xml' } + before do + stub_request(:get, /.*/) + end + after do subject.vulns_file = @vulns_file subject.vulns_xpath = vulns_xpath if defined?(vulns_xpath)