From 5b568f2e4bc2df62ba8a84c929d3bc7460acd2c5 Mon Sep 17 00:00:00 2001 From: Greg Mikeska Date: Wed, 9 Dec 2015 12:13:10 -0600 Subject: [PATCH] added missing expectation wrapper --- spec/lib/msf/core/post/windows/runas_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/lib/msf/core/post/windows/runas_spec.rb b/spec/lib/msf/core/post/windows/runas_spec.rb index 9402d01aec..92f022c572 100644 --- a/spec/lib/msf/core/post/windows/runas_spec.rb +++ b/spec/lib/msf/core/post/windows/runas_spec.rb @@ -76,7 +76,7 @@ RSpec.describe Msf::Post::Windows::Runas do expect(kernel32).to receive(:CloseHandle).with(phToken) expect(kernel32).not_to receive(:CloseHandle).with(1) expect(kernel32).not_to receive(:CloseHandle).with(2) - advapi32.to receive(:CreateProcessAsUserA).and_return('return' => false, 'GetLastError' => 1783, 'ErrorMessage' => 'parp') + expect(advapi32).to receive(:CreateProcessAsUserA).and_return('return' => false, 'GetLastError' => 1783, 'ErrorMessage' => 'parp') expect(subject.create_process_as_user(nil, 'bob', 'pass', nil, 'cmd.exe')).to be nil end @@ -86,7 +86,7 @@ RSpec.describe Msf::Post::Windows::Runas do expect(kernel32).not_to receive(:CloseHandle).with(phToken) expect(kernel32).not_to receive(:CloseHandle).with(1) expect(kernel32).not_to receive(:CloseHandle).with(2) - advapi32.to receive(:LogonUserA).and_return('return' => false, 'GetLastError' => 1783, 'ErrorMessage' => 'parp') + expect(advapi32).to receive(:LogonUserA).and_return('return' => false, 'GetLastError' => 1783, 'ErrorMessage' => 'parp') expect(subject.create_process_as_user(nil, 'bob', 'pass', nil, 'cmd.exe')).to be nil end end