[rspec-users] Nosy controller specs
apremdas at gmail.com
Fri Dec 12 03:33:24 EST 2008
I was agreeing! I wasn't saying that what you were saying there wasn't
expressing the intent in the model, I was saying that my long ramble was
saying the same thing roughly, and that this differs from the standard
approach in rails of using ActiveRecord:Base class methods directly.
Apologies for not making that clear - I find email such a challenging form
of communication at times :)
2008/12/12 Pat Maddox <pergesu at gmail.com>
> "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.
> rspec-users mailing list
> rspec-users at rubyforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users