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
context 'when method is unknown' do
before do
subject.datastore['Powershell::method'] = 'blah'
end
it 'should raise an exception' do
except = false
begin
subject.datastore['Powershell::method'] = 'blah'
subject.cmd_psh_payload(payload, arch)
rescue RuntimeError
rescue Msf::OptionValidateError
except = true
end
expect(except).to be_truthy