Dan Croak just posted testing named scopes which you should read right now.

We also have been using the rule of thumb in the last paragraph: No Chains in Controllers. Our experience is that not only do you immediately benefit from simpler tests, but we have also found that you get simpler and more expressive implementations. If we do end up using a chain we usually encapsulate it in a method, keeping the tests and code clean.

blog comments powered by Disqus