[rspec-users] stub_model() and ActiveRecord Associations

Mark Wilden mark at mwilden.com
Tue Aug 26 21:51:14 EDT 2008


On Tue, Aug 26, 2008 at 5:01 PM, David Chelimsky <dchelimsky at gmail.com>wrote:


> @target_comment = stub_model(Target)
> @target.stub!(:comments).and_return([@target_comment])
>

That's what we do - what would the drawbacks be?

///ark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20080826/40801148/attachment.html>


More information about the rspec-users mailing list