Sha256: 0f5364f37c4885ea20f60dfb225e5129626901d20816230fd2fb2caf384ca31e
Contents?: true
Size: 577 Bytes
Versions: 63
Compression:
Stored size: 577 Bytes
Contents
require 'test_helper' 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 end context "Saving a document with a blank binary value" do setup do @document = Doc do key :file, Binary end end should "not fail" do assert_nothing_raised { @document.new(:file => nil).save } end end end
Version data entries
63 entries across 63 versions & 9 rubygems