test/functional/test_binary.rb in mongo_mapper-unstable-2010.3.8 vs test/functional/test_binary.rb in mongo_mapper-unstable-2010.06.23

- old
+ new

@@ -1,19 +1,19 @@ require 'test_helper' -class BinaryTest < Test::Unit::TestCase +class BinaryTest < Test::Unit::TestCase should "serialize and deserialize correctly" do klass = Doc do key :contents, Binary end - + doc = klass.new(:contents => '010101') doc.save - + doc = doc.reload - doc.contents.to_s.should == ByteBuffer.new('010101').to_s + doc.contents.to_s.should == BSON::ByteBuffer.new('010101').to_s end - + context "Saving a document with a blank binary value" do setup do @document = Doc do key :file, Binary end \ No newline at end of file