From 008d95b4508565f984b74dfbf036cadfd5b98b9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 26 May 2011 10:13:48 +0200 Subject: [PATCH] Make bson test suite independent of mongo diff --git a/test/bson/object_id_test.rb b/test/bson/object_id_test.rb index 43082a5..ba1e6b9 100644 --- a/test/bson/object_id_test.rb +++ b/test/bson/object_id_test.rb @@ -4,9 +4,6 @@ require 'json' class ObjectIdTest < Test::Unit::TestCase - include Mongo - include BSON - def setup @o = ObjectId.new end @@ -65,17 +62,18 @@ class ObjectIdTest < Test::Unit::TestCase assert_equal "BSON::ObjectId('#{@o.to_s}')", @o.inspect end - def test_save_and_restore - db = standard_connection.db(MONGO_TEST_DB) - coll = db.collection('test') - - coll.remove - coll << {'a' => 1, '_id' => @o} - - row = coll.find().collect.first - assert_equal 1, row['a'] - assert_equal @o, row['_id'] - end +# This test should be moved into Mongo. +# def test_save_and_restore +# db = standard_connection.db(MONGO_TEST_DB) +# coll = db.collection('test') +# +# coll.remove +# coll << {'a' => 1, '_id' => @o} +# +# row = coll.find().collect.first +# assert_equal 1, row['a'] +# assert_equal @o, row['_id'] +# end def test_from_string hex_str = @o.to_s diff --git a/test/bson/timestamp_test.rb b/test/bson/timestamp_test.rb index 37cfec3..1e0b406 100644 --- a/test/bson/timestamp_test.rb +++ b/test/bson/timestamp_test.rb @@ -1,7 +1,6 @@ require './test/test_helper' class TiumestampTest < Test::Unit::TestCase - include Mongo def test_timestamp_equality t1 = Timestamp.new(5000, 200) -- 1.7.5.1