minor: test fix for mocha 0.10.5 -- new initializer

This commit is contained in:
Tyler Brock 2012-03-01 13:03:52 -05:00
parent 66227e17c8
commit 379c831b8b
1 changed files with 2 additions and 2 deletions

View File

@ -238,7 +238,7 @@ class TestConnection < Test::Unit::TestCase
assert !conn.active?
# Simulate a dropped connection.
dropped_socket = Mocha::Mock.new
dropped_socket = mock('dropped_socket')
dropped_socket.stubs(:read).raises(Errno::ECONNRESET)
dropped_socket.stubs(:send).raises(Errno::ECONNRESET)
dropped_socket.stub_everything
@ -357,7 +357,7 @@ class TestConnection < Test::Unit::TestCase
end
should "show a proper exception message if an IOError is raised while closing a socket" do
fake_socket = Mocha::Mock.new
fake_socket = mock('fake_socket')
fake_socket.stubs(:close).raises(IOError.new)
fake_socket.stub_everything
TCPSocket.stubs(:new).returns(fake_socket)