Sha256: fff234d58b58850196922c4375965a0e4401bad58cf4638e7cc80f714d5b2fba
Contents?: true
Size: 556 Bytes
Versions: 9
Compression:
Stored size: 556 Bytes
Contents
require 'spec_helper' describe "Binary" do it "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.data.should == BSON::Binary.new('010101').data end context "Saving a document with a blank binary value" do before do @document = Doc do key :file, Binary end end it "not fail" do lambda { @document.new(:file => nil).save }.should_not raise_error end end end
Version data entries
9 entries across 9 versions & 1 rubygems