Sha256: a56e097d5f398129eaee61fb22c47bf92c1a8932766576dd3dec33de3392d47c
Contents?: true
Size: 431 Bytes
Versions: 20
Compression:
Stored size: 431 Bytes
Contents
require 'test_helper' class BinaryTest < Test::Unit::TestCase should "serialize and deserialize correctly" do klass = Class.new do include MongoMapper::Document set_collection_name 'test' key :contents, Binary end klass.collection.remove doc = klass.new(:contents => '010101') doc.save doc = doc.reload doc.contents.to_s.should == ByteBuffer.new('010101').to_s end end
Version data entries
20 entries across 20 versions & 5 rubygems