2010-02-08 18:48:18 +00:00
|
|
|
# encoding:utf-8
|
2012-04-11 15:08:04 +00:00
|
|
|
require File.expand_path("../test_helper", __FILE__)
|
2010-02-08 18:48:18 +00:00
|
|
|
|
2010-02-22 20:49:04 +00:00
|
|
|
class BinaryTest < Test::Unit::TestCase
|
2011-11-15 21:04:33 +00:00
|
|
|
def setup
|
|
|
|
@data = ("THIS IS BINARY " * 50).unpack("c*")
|
|
|
|
end
|
2010-02-08 18:48:18 +00:00
|
|
|
|
2011-11-15 21:04:33 +00:00
|
|
|
def test_do_not_display_binary_data
|
|
|
|
binary = BSON::Binary.new(@data)
|
|
|
|
assert_equal "<BSON::Binary:#{binary.object_id}>", binary.inspect
|
2010-02-08 18:48:18 +00:00
|
|
|
end
|
|
|
|
end
|