mongo-ruby-driver/test/bson/binary_test.rb

16 lines
361 B
Ruby
Raw Normal View History

2010-02-08 18:48:18 +00:00
# encoding:utf-8
require './test/bson/test_helper'
2010-02-08 18:48:18 +00:00
2010-02-22 20:49:04 +00:00
class BinaryTest < Test::Unit::TestCase
context "Inspecting" do
setup do
@data = ("THIS IS BINARY " * 50).unpack("c*")
end
2010-02-08 18:48:18 +00:00
2010-02-22 20:49:04 +00:00
should "not display actual data" do
2010-04-05 14:39:55 +00:00
binary = BSON::Binary.new(@data)
2010-04-05 15:07:01 +00:00
assert_equal "<BSON::Binary:#{binary.object_id}>", binary.inspect
2010-02-22 20:49:04 +00:00
end
2010-02-08 18:48:18 +00:00
end
end