Mock and initialize logger

This commit is contained in:
Wojciech Piekutowski 2011-02-20 16:04:01 +01:00
parent 27046e2b3a
commit 2644d2b27d
1 changed files with 3 additions and 1 deletions

View File

@ -72,7 +72,9 @@ class CursorTest < Test::Unit::TestCase
context "Query fields" do context "Query fields" do
setup 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) @db = stub(:slave_ok? => true, :name => "testing", :connection => @connection)
@collection = stub(:db => @db, :name => "items") @collection = stub(:db => @db, :name => "items")
end end