Sha256: a60a23ed8ff682e89e1f40d287879f8505bc0eceb83b87ee0d96cf91e2805684
Contents?: true
Size: 552 Bytes
Versions: 31
Compression:
Stored size: 552 Bytes
Contents
require "spec_helper" describe Mongoid::Extensions::Nil::Assimilation do describe "#assimilate" do before do @name = Name.new(:first_name => "Durran") @parent = Person.new(:title => "Mr.", :name => @name) @options = Mongoid::Associations::Options.new(:name => :name) end it "removes the child attribute from the parent" do nil.assimilate(@parent, @options) @parent.attributes[:name].should be_nil end it "returns nil" do nil.assimilate(@parent, @options).should be_nil end end end
Version data entries
31 entries across 31 versions & 2 rubygems