Changed test that failes because Mongo started generating _id values automagically. Bumped patch version number. Changed test that needed bogus domain but used existing example.com.

This commit is contained in:
Jim Menard 2009-02-01 09:03:55 -05:00
parent 9b7b45f27c
commit 2748338deb
3 changed files with 6 additions and 3 deletions

View File

@ -1,6 +1,6 @@
Gem::Specification.new do |s| Gem::Specification.new do |s|
s.name = 'mongo' s.name = 'mongo'
s.version = '0.4.3' s.version = '0.4.4'
s.platform = Gem::Platform::RUBY s.platform = Gem::Platform::RUBY
s.summary = 'Simple pure-Ruby driver for the 10gen Mongo DB' s.summary = 'Simple pure-Ruby driver for the 10gen Mongo DB'
s.description = 'A pure-Ruby driver for the 10gen Mongo DB. For more information about Mongo, see http://www.mongodb.org.' s.description = 'A pure-Ruby driver for the 10gen Mongo DB. For more information about Mongo, see http://www.mongodb.org.'

View File

@ -53,7 +53,7 @@ class DBTest < Test::Unit::TestCase
def test_pair def test_pair
@db.close @db.close
@users = nil @users = nil
@db = Mongo.new({:left => "nosuch.example.com", :right => [@host, @port]}).db('ruby-mongo-test') @db = Mongo.new({:left => "this-should-fail", :right => [@host, @port]}).db('ruby-mongo-test')
assert @db.connected? assert @db.connected?
end end

View File

@ -70,7 +70,10 @@ class DBAPITest < Test::Unit::TestCase
docs = @coll.find('a' => @r1['a']).to_a docs = @coll.find('a' => @r1['a']).to_a
assert_equal 1, docs.size assert_equal 1, docs.size
doc = docs.first doc = docs.first
assert_equal doc['_id'], @r1['_id'] # Can't compare _id values because at insert, an _id was added to @r1 by
# the database but we don't know what it is without re-reading the record
# (which is what we are doing right now).
# assert_equal doc['_id'], @r1['_id']
assert_equal doc['a'], @r1['a'] assert_equal doc['a'], @r1['a']
end end