Skip to content
Browse files

Merge pull request #51 from bernerdschaefer/master

BSON test fixes
  • Loading branch information...
2 parents 6b8d19b + 7f906b4 commit 880f40bcaa9968bfeaa480ff2c434016b862aacd @banker banker committed Jul 11, 2011
Showing with 14 additions and 10 deletions.
  1. +4 −2 test/bson/bson_test.rb
  2. +1 −1 test/bson/ordered_hash_test.rb
  3. +9 −7 test/bson/timestamp_test.rb
View
6 test/bson/bson_test.rb
@@ -436,8 +436,10 @@ def test_timestamp
0x00, 0x00, 0x14, 0x00,
0x00, 0x00, 0x00])
- assert_equal 4, result["test"][0]
- assert_equal 20, result["test"][1]
+ silently do
+ assert_equal 4, result["test"][0]
+ assert_equal 20, result["test"][1]
+ end
end
end
View
2 test/bson/ordered_hash_test.rb
@@ -88,7 +88,7 @@ def test_replace
assert_equal [:c, :d], h1.keys
assert_equal [3, 4], h1.values
- assert h1.keys.id != h2.keys.id
+ assert h1.keys.object_id != h2.keys.object_id
end
def test_to_a_order_preserved
View
16 test/bson/timestamp_test.rb
@@ -10,15 +10,17 @@ def test_timestamp_equality
end
def test_implements_array_for_backward_compatibility
- ts = Timestamp.new(5000, 200)
- assert_equal 200, ts[0]
- assert_equal 5000, ts[1]
+ silently do
+ ts = Timestamp.new(5000, 200)
+ assert_equal 200, ts[0]
+ assert_equal 5000, ts[1]
- array = ts.map {|t| t }
- assert_equal 2, array.length
+ array = ts.map {|t| t }
+ assert_equal 2, array.length
- assert_equal 200, array[0]
- assert_equal 5000, array[1]
+ assert_equal 200, array[0]
+ assert_equal 5000, array[1]
+ end
end
end

0 comments on commit 880f40b

Please sign in to comment.
Something went wrong with that request. Please try again.