Sha256: 6d4d216f53739e64d3b645e367b40776d32000e4fb45cf1d6400154e5d6761e6

Contents?: true

Size: 392 Bytes

Versions: 7

Compression:

Stored size: 392 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), "/../../../../spec_helper.rb"))

describe Mongoid::Extensions::Object::Parentization do

  describe "#parentize" do

    before do
      @parent = Person.new
      @child = Name.new
    end

    it "sets the parent on each element" do
      @child.parentize(@parent, :child)
      @child.parent.should == @parent
    end

  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
mongoid-0.7.0 spec/unit/mongoid/extensions/object/parentization_spec.rb
mongoid-0.6.10 spec/unit/mongoid/extensions/object/parentization_spec.rb
mongoid-0.6.9 spec/unit/mongoid/extensions/object/parentization_spec.rb
mongoid-0.6.8 spec/unit/mongoid/extensions/object/parentization_spec.rb
mongoid-0.6.7 spec/unit/mongoid/extensions/object/parentization_spec.rb
mongoid-0.6.6 spec/unit/mongoid/extensions/object/parentization_spec.rb
mongoid-0.6.5 spec/unit/mongoid/extensions/object/parentization_spec.rb