Fixing the failing specs

for some reason on my box sock.closed? isnt being called. stubbing it out

Kernel.select is being called and cant cast a mock object to an IO object
ok to fix this I'm stubbing select on the scanner object then the call wont
get passed onto the Kernel module
bug/bundler_fix
Lance Sanchez 2014-06-05 11:21:34 -05:00
parent 28bf29980e
commit 262deac155
No known key found for this signature in database
GPG Key ID: 3922EB70FB80E8DD
1 changed files with 2 additions and 1 deletions

View File

@ -48,9 +48,10 @@ describe Metasploit::Framework::LoginScanner::POP3 do
before(:each) do
sock.stub(:shutdown)
sock.stub(:close)
sock.stub(:closed?)
expect(scanner).to receive(:connect)
scanner.stub(:sock).and_return(sock)
scanner.should_receive(:select).with([sock],nil,nil,0.4)
end
it "Server returns +OK" do