test and update gemspec
This commit is contained in:
parent
37044a38f5
commit
ce406d92f7
@ -35,6 +35,7 @@ PACKAGE_FILES = ['README.rdoc', 'Rakefile', 'mongo-ruby-driver.gemspec',
|
||||
'lib/mongo/mongo.rb',
|
||||
'lib/mongo/query.rb',
|
||||
'lib/mongo/types/binary.rb',
|
||||
'lib/mongo/types/code.rb',
|
||||
'lib/mongo/types/dbref.rb',
|
||||
'lib/mongo/types/objectid.rb',
|
||||
'lib/mongo/types/regexp_of_holding.rb',
|
||||
|
@ -442,6 +442,15 @@ class DBAPITest < Test::Unit::TestCase
|
||||
assert_equal "#{@@db.host}:#{@@db.port}", @@db.master
|
||||
end
|
||||
|
||||
def test_where
|
||||
@@coll.insert('a' => 2)
|
||||
@@coll.insert('a' => 3)
|
||||
|
||||
assert_equal 3, @@coll.count
|
||||
assert_equal 1, @@coll.find('$where' => Code.new('this.a > 2')).count
|
||||
assert_equal 2, @@coll.find('$where' => Code.new('this.a > i', {'i' => 1})).count
|
||||
end
|
||||
|
||||
def test_hint
|
||||
name = @@coll.create_index('a')
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user