search for: on_an_object_match

Displaying 1 result from an estimated 1 matches for "on_an_object_match".

2008 Aug 26
9
stub_model() and ActiveRecord Associations
...ments.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 really need to do is express my mock like... (commence pseudo code) Comment.should_receive_instance_method(:merge_in).with (...).on_an_object_matching{|o| o.id = @target_comment.id} (/pseudo code) Has anyone else come across similar issues? How did you approach them? cheers, Matt ---- http://blog.mattwynne.net http://songkick.com In case you wondered: The opinions expressed in this email are my own and do not necessarily reflect the vie...