From c69bfc6c13b33cd083ce67571600088b666b49f7 Mon Sep 17 00:00:00 2001 From: Kyle Banker Date: Tue, 15 Nov 2011 16:04:33 -0500 Subject: [PATCH] RUBY-336 remove mocha and shoulda dependency from BSON tests --- test/bson/binary_test.rb | 14 ++++++-------- test/bson/bson_test.rb | 1 + test/bson/test_helper.rb | 17 ----------------- 3 files changed, 7 insertions(+), 25 deletions(-) diff --git a/test/bson/binary_test.rb b/test/bson/binary_test.rb index 30ffa78..666e7c3 100644 --- a/test/bson/binary_test.rb +++ b/test/bson/binary_test.rb @@ -2,14 +2,12 @@ require './test/bson/test_helper' class BinaryTest < Test::Unit::TestCase - context "Inspecting" do - setup do - @data = ("THIS IS BINARY " * 50).unpack("c*") - end + def setup + @data = ("THIS IS BINARY " * 50).unpack("c*") + end - should "not display actual data" do - binary = BSON::Binary.new(@data) - assert_equal "", binary.inspect - end + def test_do_not_display_binary_data + binary = BSON::Binary.new(@data) + assert_equal "", binary.inspect end end diff --git a/test/bson/bson_test.rb b/test/bson/bson_test.rb index b9e0e26..ff00f83 100644 --- a/test/bson/bson_test.rb +++ b/test/bson/bson_test.rb @@ -9,6 +9,7 @@ end require 'bigdecimal' begin + require 'date' require 'tzinfo' require 'active_support/core_ext' Time.zone = "Pacific Time (US & Canada)" diff --git a/test/bson/test_helper.rb b/test/bson/test_helper.rb index 668f77e..5cda020 100644 --- a/test/bson/test_helper.rb +++ b/test/bson/test_helper.rb @@ -10,23 +10,6 @@ def silently result end -begin - require 'rubygems' if RUBY_VERSION < "1.9.0" && !ENV['C_EXT'] - silently { require 'shoulda' } - silently { require 'mocha' } -rescue LoadError - puts <