[rspec-users] Of ActiveRecord, arel, and train wrecks

Rick DeNatale rick.denatale at gmail.com
Mon Feb 22 18:35:10 EST 2010


On Mon, Feb 22, 2010 at 6:16 PM, Scott Taylor <scott at 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


More information about the rspec-users mailing list