Displaying 1 result from an estimated 1 matches for "do_merge".
Did you mean:
no_merge
2008 Aug 26
9
stub_model() and ActiveRecord Associations
...urce.comments.create(:user_id => 1)
@target_comment = @target.comments.create(:user_id => 1)
end
it "should return the same object from create() as from the
array" do
(@target_comment.equal?(@target.comments[0])).should be_true
do_merge
end
What I actually want to be able to do, is mock a method call on the
@target_comment but I''m finding that I get unreliable results:
@target.comments[0].should_receive(:merge_in) # works
# @target_comment.should_receive(:merge_in) # doesn''t work...