Call stance only if module implements stance

bug/bundler_fix
Gregory Mikeska 2015-12-10 12:24:07 -06:00 committed by Brent Cook
parent b29459747b
commit 99931aff44
1 changed files with 14 additions and 2 deletions

View File

@ -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)