[rspec-users] Easy AR association stubbing
Andrew WC Brown
omen.king at gmail.com
Sat Oct 6 17:42:15 EDT 2007
But what if I need to use posts as such?
@person = mock_model(Person)
@person.stub_association!(:posts, :find_by_title => mock_model(Post))
posts.stub!(:count).and_return(2)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20071006/0d1ca9da/attachment.html
More information about the rspec-users
mailing list