update spec for pre-check

bug/bundler_fix
Brent Cook 2016-03-15 14:21:01 -05:00
parent 654590911b
commit 903807d039
1 changed files with 2 additions and 4 deletions

View File

@ -323,14 +323,12 @@ RSpec.describe Msf::Exploit::Powershell do
end end
context 'when method is unknown' do context 'when method is unknown' do
before do
subject.datastore['Powershell::method'] = 'blah'
end
it 'should raise an exception' do it 'should raise an exception' do
except = false except = false
begin begin
subject.datastore['Powershell::method'] = 'blah'
subject.cmd_psh_payload(payload, arch) subject.cmd_psh_payload(payload, arch)
rescue RuntimeError rescue Msf::OptionValidateError
except = true except = true
end end
expect(except).to be_truthy expect(except).to be_truthy