Sha256: 46a088da4e4145d91da03724f7822d972af82765693cc4e63b2e016a2755a10f
Contents?: true
Size: 586 Bytes
Versions: 5
Compression:
Stored size: 586 Bytes
Contents
require File.expand_path(File.join(File.dirname(__FILE__), "/../../../../spec_helper.rb")) describe Mongoid::Extensions::Hash::Assimilation do describe "#assimilate" do before do @child = { :first_name => "Hank", :last_name => "Moody" } @parent = Person.new(:title => "Mr.") @options = Mongoid::Associations::Options.new(:name => :name) end it "incorporates the hash into the object graph" do @child.assimilate(@parent, @options) @parent.name.first_name.should == "Hank" @parent.name.last_name.should == "Moody" end end end
Version data entries
5 entries across 5 versions & 1 rubygems