Mock and initialize logger
This commit is contained in:
parent
27046e2b3a
commit
2644d2b27d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue