Rails model association collections allow you to do nifty things like:
article.comments.find(:all, :conditions = {:created_at 1.day.ago})
Has anyone found a good way to mock this up? I'm currently doing this:
@comment1 = mock_model(Comment)
comments = mock(Array)
On 7/18/07, Paul [EMAIL PROTECTED] wrote:
Rails model association collections allow you to do nifty things like:
article.comments.find(:all, :conditions = {:created_at 1.day.ago})
Has anyone found a good way to mock this up? I'm currently doing this:
@comment1 = mock_model(Comment)