From 8c3283f5146d9a63ae08312131a0ae62454e67e4 Mon Sep 17 00:00:00 2001 From: Tyler Brock Date: Tue, 6 Mar 2012 22:56:39 -0500 Subject: [PATCH] minor: switched additional tests to socket mock --- test/unit/read_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/unit/read_test.rb b/test/unit/read_test.rb index dbd86b7..643fa5c 100644 --- a/test/unit/read_test.rb +++ b/test/unit/read_test.rb @@ -67,12 +67,12 @@ class ReadTest < Test::Unit::TestCase context "on read mode ops" do setup do @col = @con['foo']['bar'] - @mock_socket = stub() + @mock_socket = new_mock_socket end should "use default value on query" do @cursor = @col.find({:a => 1}) - sock = mock() + sock = new_mock_socket read_pool = stub(:checkin => true) @con.stubs(:read_pool).returns(read_pool) primary_pool = stub(:checkin => true) @@ -87,7 +87,7 @@ class ReadTest < Test::Unit::TestCase should "allow override default value on query" do @cursor = @col.find({:a => 1}, :read => :primary) - sock = mock() + sock = new_mock_socket primary_pool = stub(:checkin => true) @con.stubs(:primary_pool).returns(primary_pool) @con.expects(:checkout_writer).returns(sock)