Displaying 1 result from an estimated 1 matches for "merge_in".
Did you mean:
merge_i
2008 Aug 26
9
stub_model() and ActiveRecord Associations
...(@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
The code I''m testing is using self.comments.each() to access the
object it''s going to call merge_in() on - the one I want to mock.
Any tips here folks?
Someone here has suggested that what I...