Fix unimplemented method allows

MSP-13484
bug/bundler_fix
Luke Imhoff 2015-10-21 08:43:38 -05:00 committed by Brent Cook
parent 05585acb89
commit a8f766ffbd
2 changed files with 10 additions and 9 deletions

View File

@ -38,9 +38,14 @@ RSpec.describe Msf::Exploit::Remote::BrowserExploitServer do
end
let(:cli) do
sock = Rex::Socket::Tcp
sock_class = Class.new do
include Rex::Socket::Tcp
end
sock = sock_class.new
allow(sock).to receive(:peerhost).and_return('0.0.0.0')
allow(sock).to receive(:peerport).and_return(4444)
sock
end
@ -199,9 +204,6 @@ RSpec.describe Msf::Exploit::Remote::BrowserExploitServer do
describe '#on_request_uri' do
before(:each) do
allow(server).to receive(:get_profile_info) { in_memory_profile }
allow(server).to receive(:init_profile).with(kind_of(String))
allow(server).to receive(:update_profile)
allow(server).to receive(:process_browser_info)
allow(server).to receive(:send_response) { @send_response_called = true }
allow(server).to receive(:send_redirect) { @send_redirect_called = true }

View File

@ -2,11 +2,11 @@ require 'msf/core'
RSpec.describe Msf::Exploit::Remote::BrowserProfileManager do
subject do
subject(:exploit_remmote) {
mod = Msf::Exploit::Remote.allocate
mod.extend described_class
mod
end
}
let(:default_profile) do
{
@ -15,9 +15,8 @@ RSpec.describe Msf::Exploit::Remote::BrowserProfileManager do
end
before(:each) do
framework = double('framework')
allow(framework).to receive(:browser_profiles).and_return(default_profile)
allow_any_instance_of(described_class).to receive(:framework).and_return(framework)
framework = double('framework', browser_profiles: default_profile)
allow(exploit_remmote).to receive(:framework).and_return(framework)
end
describe '#browser_profile_prefix' do