Merge branch 'master' of git://github.com/jimm/mongo-ruby-driver

This commit is contained in:
Adrian Madrid 2008-12-09 13:33:51 -07:00
commit 3e5422762f

View File

@ -133,14 +133,13 @@ class DBAPITest < Test::Unit::TestCase
assert_equal 2, docs.size
assert_equal 2, docs.first['a']
# Sorting using array of names; assumes ascending order
# NOTE: Mongo itself does not yet properly sort by multiple names
# Sorting using array of names; assumes ascending order.
docs = @coll.find({'a' => { '$lt' => 10 }}, :sort => ['a']).map
assert_equal 2, docs.size
assert_equal 1, docs.first['a']
# Sorting using empty array; no order guarantee but should not blow up.
docs = @coll.find({'a' => { '$lt' => 10 }}, :sort => [{'a' => -1}]).map
docs = @coll.find({'a' => { '$lt' => 10 }}, :sort => []).map
assert_equal 2, docs.size
# Sorting using ordered hash. You can use an unordered one, but then the