diff --git a/spec/support/shared/examples/msf/module/search.rb b/spec/support/shared/examples/msf/module/search.rb index 18c8726123..3c5271ca8d 100644 --- a/spec/support/shared/examples/msf/module/search.rb +++ b/spec/support/shared/examples/msf/module/search.rb @@ -44,7 +44,13 @@ shared_examples_for 'Msf::Module::Search' do end context 'on a client module' do - # before { allow(subject).to receive(:stance).and_return('passive') } + before do + if subject.respond_to? :stance + allow(subject).to receive(:stance).and_return('passive') + else + skip + end + end accept = %w(app:client) reject = %w(app:server) @@ -52,7 +58,13 @@ shared_examples_for 'Msf::Module::Search' do end context 'on a server module' do - # before { allow(subject).to receive(:stance).and_return('aggressive') } + before do + if subject.respond_to? :stance + allow(subject).to receive(:stance).and_return('aggressive') + else + skip + end + end accept = %w(app:server) reject = %w(app:client)