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'
|
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
|
||||||
|
@ -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)"
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user