RUBY-336 remove mocha and shoulda dependency from BSON tests
This commit is contained in:
parent
6345820eae
commit
c69bfc6c13
|
@ -2,14 +2,12 @@
|
|||
require './test/bson/test_helper'
|
||||
|
||||
class BinaryTest < Test::Unit::TestCase
|
||||
context "Inspecting" do
|
||||
setup do
|
||||
def setup
|
||||
@data = ("THIS IS BINARY " * 50).unpack("c*")
|
||||
end
|
||||
|
||||
should "not display actual data" do
|
||||
def test_do_not_display_binary_data
|
||||
binary = BSON::Binary.new(@data)
|
||||
assert_equal "<BSON::Binary:#{binary.object_id}>", binary.inspect
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -9,6 +9,7 @@ end
|
|||
require 'bigdecimal'
|
||||
|
||||
begin
|
||||
require 'date'
|
||||
require 'tzinfo'
|
||||
require 'active_support/core_ext'
|
||||
Time.zone = "Pacific Time (US & Canada)"
|
||||
|
|
|
@ -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 <<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']
|
||||
|
||||
class Test::Unit::TestCase
|
||||
|
|
Loading…
Reference in New Issue