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-1.1.3 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-1.1.2 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-1.1.1 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-1.1.0 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-1.0.6 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-1.0.5 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-1.0.4 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-1.0.3 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-1.0.2 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-1.0.1 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-1.0.0 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-0.12.0 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-0.11.9 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-0.11.8 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-0.11.7 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-0.11.6 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-0.11.5 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-0.11.4 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-0.11.3 spec/unit/mongoid/extensions/array/parentization_spec.rb
mongoid-0.11.2 spec/unit/mongoid/extensions/array/parentization_spec.rb