minor: test fix and cleanup
This commit is contained in:
parent
9c83ca6b3e
commit
5017646209
|
@ -5,6 +5,7 @@ class CollectionTest < Test::Unit::TestCase
|
|||
context "Basic operations: " do
|
||||
setup do
|
||||
@logger = mock()
|
||||
@logger.expects(:debug)
|
||||
end
|
||||
|
||||
should "send update message" do
|
||||
|
@ -90,8 +91,8 @@ class CollectionTest < Test::Unit::TestCase
|
|||
|
||||
@coll.ensure_index [["x", Mongo::DESCENDING]]
|
||||
@coll.ensure_index [["x", Mongo::DESCENDING]]
|
||||
|
||||
end
|
||||
|
||||
should "call generate_indexes for a new direction on the same field for ensure_index" do
|
||||
@conn = Connection.new('localhost', 27017, :logger => @logger, :connect => false)
|
||||
@db = @conn['testing']
|
||||
|
@ -110,7 +111,6 @@ class CollectionTest < Test::Unit::TestCase
|
|||
@coll = @db.collection('books')
|
||||
@coll.expects(:generate_indexes).twice
|
||||
|
||||
|
||||
@coll.ensure_index [["x", Mongo::DESCENDING]]
|
||||
@coll.ensure_index [["x", Mongo::DESCENDING]]
|
||||
end
|
||||
|
@ -126,8 +126,5 @@ class CollectionTest < Test::Unit::TestCase
|
|||
|
||||
@coll.ensure_index [["x", Mongo::DESCENDING], ["y", Mongo::DESCENDING]]
|
||||
end
|
||||
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue