[rspec-users] Specs for ApplicationController, where to put them?

Joe Van Dyk joevandyk at gmail.com
Thu May 24 10:31:21 EDT 2007

On 5/24/07, Wincent Colaiuta <win at wincent.com> wrote:
> El 24/5/2007, a las 9:18, Tim Lucas escribió:
> > I did it a slighty dodgy way (spec/controllers/
> > application_controller_spec.rb):
> > http://pastie.caboo.se/64123
> First, thanks for the advice!
> Why do you say "dodgy"?
> > but nowadays you can probably use a shared spec, like so (require'd
> > from your spec helper):
> Probably not a bad idea. In that way you'd get confirmation that no
> subclass is overriding the behaviour of the superclass in unexpected
> ways.

I'd vote for shared spec (i.e. CaresAboutLoggingIn) and have that spec
test that the controller does the right things.


More information about the rspec-users mailing list