2010-02-08 18:48:18 +00:00
|
|
|
# encoding:utf-8
|
2010-09-09 19:58:51 +00:00
|
|
|
require './test/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
|