From 2644d2b27d261071246eb9396ac2bcfd70ff0c68 Mon Sep 17 00:00:00 2001 From: Wojciech Piekutowski Date: Sun, 20 Feb 2011 16:04:01 +0100 Subject: [PATCH] Mock and initialize logger --- test/unit/cursor_test.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/unit/cursor_test.rb b/test/unit/cursor_test.rb index f7f7775..841468b 100644 --- a/test/unit/cursor_test.rb +++ b/test/unit/cursor_test.rb @@ -72,7 +72,9 @@ class CursorTest < Test::Unit::TestCase context "Query fields" do setup do - @connection = stub(:class => Collection, :logger => @logger) + @logger = mock() + @logger.stubs(:debug) + @connection = stub(:class => Connection, :logger => @logger) @db = stub(:slave_ok? => true, :name => "testing", :connection => @connection) @collection = stub(:db => @db, :name => "items") end