Sha256: c3ec76dc43607e598c8c1ebbce81aedb1928da25bef1b0ff4a9610349d5a8c89

Contents?: true

Size: 422 Bytes

Versions: 23

Compression:

Stored size: 422 Bytes

Contents

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

describe Mongoid::Extensions::Array::Parentization do

  describe "#parentize" do

    before do
      @parent = stub
      @child = mock
      @array = [@child]
    end

    it "sets the parent on each element" do
      @child.expects(:parentize).with(@parent, :child)
      @array.parentize(@parent, :child)
    end

  end

end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
mongoid-0.9.2 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-0.9.1 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-0.9.0 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-0.8.10 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-0.8.9 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-0.8.8 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-0.8.7 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-0.8.6 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-0.8.5 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-0.8.4 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-0.8.3 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-0.8.2 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-0.8.1 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-0.7.10 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-0.7.9 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-0.7.8 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-0.7.7 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-0.7.6 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-0.7.5 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-0.7.4 spec/unit/mongoid/extensions/array/parentization_spec.rb