[rspec-users] Nosy controller specs
Pat Maddox
pergesu at gmail.com
Fri Dec 12 01:20:58 EST 2008
"Andrew Premdas" <apremdas at gmail.com> writes:
> 2008/12/11 Pat Maddox <pergesu at gmail.com> writes
>> The clearest way to represent these contextual differences, in my
>> experience, is to create an intention-revealing method and use that.
>
> The point I'm making is that this intention should be expressed
> clearly in the model, whereas currently its expressed in the
> controller.
What? No. I said create methods with intention-revealing names. That
means stuff like Post.since or Account.audited or
Product.non_refillable. That absolutely is expressing the intent in the
model, and calling it from the controller, which is what you want.
Pat
More information about the rspec-users
mailing list