Sha256: 9f088ae9c34a039e12efe3c7e27054d13f4989d8aad3db713eb891837efb572b

Contents?: true

Size: 353 Bytes

Versions: 59

Compression:

Stored size: 353 Bytes

Contents

require "spec_helper"

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

59 entries across 59 versions & 3 rubygems

Version Path
mongoid-locomotive-2.0.0.beta9 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-pre-2.0.0.beta1 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-2.0.0.alpha spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-1.2.14 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-1.2.13 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-1.2.12 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-1.2.11 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-1.2.10 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-1.2.9 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-1.2.8 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-1.2.7 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-pre-2.0.0.pre spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-1.2.6 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-1.2.5 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-1.2.4 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-1.2.3 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-1.2.2 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-1.2.1 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-1.2.0 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-1.1.4 spec/unit/mongoid/extensions/array/parentization_spec.rb