On Mon, Feb 22, 2010 at 6:16 PM, Scott Taylor <sc...@railsnewbie.com> wrote:

> I haven't spent enough time with it yet to know, but I suspect that surface 
> mocking (what is usually called stubbing in this community) is going to get 
> harder with the demeter violations.
>

One of the things that I tend to do, is to not use chained scopes in
controllers, but define model methods which use them, which allows for
stubbing/mocking those methods, and keeps the train wrecks isolated.

-- 
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to