Sha256: 9004410cfe13ec4b29005fe587aafd25ce2eff6ad33ddda96ca6f13fa7d4e326
Contents?: true
Size: 498 Bytes
Versions: 19
Compression:
Stored size: 498 Bytes
Contents
require 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(:add_observer).with(@parent) @child.expects(:parent=).with(@parent) @child.expects(:association_name=).with(:child) @array.parentize(@parent, :child) end end end
Version data entries
19 entries across 19 versions & 1 rubygems