From 379c831b8b892663c9ccb44519792c03a1371da5 Mon Sep 17 00:00:00 2001 From: Tyler Brock Date: Thu, 1 Mar 2012 13:03:52 -0500 Subject: [PATCH] minor: test fix for mocha 0.10.5 -- new initializer --- test/connection_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/connection_test.rb b/test/connection_test.rb index 752a9ff..3e4d932 100644 --- a/test/connection_test.rb +++ b/test/connection_test.rb @@ -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)