RUBY-336 remove mocha and shoulda dependency from BSON tests

This commit is contained in:
Kyle Banker 2011-11-15 16:04:33 -05:00
parent 6345820eae
commit c69bfc6c13
3 changed files with 7 additions and 25 deletions

View File

@ -2,14 +2,12 @@
require './test/bson/test_helper' require './test/bson/test_helper'
class BinaryTest < Test::Unit::TestCase class BinaryTest < Test::Unit::TestCase
context "Inspecting" do def setup
setup do @data = ("THIS IS BINARY " * 50).unpack("c*")
@data = ("THIS IS BINARY " * 50).unpack("c*") end
end
should "not display actual data" do def test_do_not_display_binary_data
binary = BSON::Binary.new(@data) binary = BSON::Binary.new(@data)
assert_equal "<BSON::Binary:#{binary.object_id}>", binary.inspect assert_equal "<BSON::Binary:#{binary.object_id}>", binary.inspect
end
end end
end end

View File

@ -9,6 +9,7 @@ end
require 'bigdecimal' require 'bigdecimal'
begin begin
require 'date'
require 'tzinfo' require 'tzinfo'
require 'active_support/core_ext' require 'active_support/core_ext'
Time.zone = "Pacific Time (US & Canada)" Time.zone = "Pacific Time (US & Canada)"

View File

@ -10,23 +10,6 @@ def silently
result result
end end
begin
require 'rubygems' if RUBY_VERSION < "1.9.0" && !ENV['C_EXT']
silently { require 'shoulda' }
silently { require 'mocha' }
rescue LoadError
puts <<MSG
This test suite requires shoulda and mocha.
You can install them as follows:
gem install shoulda
gem install mocha
MSG
exit
end
require 'bson_ext/cbson' if !(RUBY_PLATFORM =~ /java/) && ENV['C_EXT'] require 'bson_ext/cbson' if !(RUBY_PLATFORM =~ /java/) && ENV['C_EXT']
class Test::Unit::TestCase class Test::Unit::TestCase