From 7f906b44b4dd199dfd5442723af58f05c6bd9e17 Mon Sep 17 00:00:00 2001 From: Bernerd Schaefer Date: Fri, 8 Jul 2011 13:54:01 +0200 Subject: [PATCH] Silence deprecation warnings from BSON tests --- test/bson/bson_test.rb | 6 ++++-- test/bson/timestamp_test.rb | 16 +++++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/test/bson/bson_test.rb b/test/bson/bson_test.rb index fe2d097..37926e6 100644 --- a/test/bson/bson_test.rb +++ b/test/bson/bson_test.rb @@ -436,8 +436,10 @@ class BSONTest < Test::Unit::TestCase 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 diff --git a/test/bson/timestamp_test.rb b/test/bson/timestamp_test.rb index 37cfec3..d9cf0b3 100644 --- a/test/bson/timestamp_test.rb +++ b/test/bson/timestamp_test.rb @@ -10,15 +10,17 @@ class TiumestampTest < Test::Unit::TestCase 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