> I hope that makes sense. Happy to explain with more examples if it helps.
> 

I think what you have shown makes sense. You are stubbing out the "paid" method 
on a LineItem to return a predefined value and the model under test is 
responding as expected.

Whether the "paid" call executes a named_scope or instance method is really 
inconsequential to the object under test.

As long as the LineItem model has an appropriate test that "paid" is returning 
the correct value we should be all good.

Having an integration test on top of all this would ensure that everything is 
wired up as expected.

Scott

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rails-oceania?hl=en.

Reply via email to