[rspec-users] get to a different controller

Phillip Koebbe phillipkoebbe at gmail.com
Tue Jan 5 15:52:25 EST 2010

Pat Maddox wrote:
> The spec has Admin::BaseController as the described type.  So of course it's going to test against that.  If you want to test a different class, you need to describe that instead!

Hi Pat,

Right. But, I'm not really wanting to test a different class. My 
intention is to put the require_admin in the base_controller and have 
all the admin controllers descend from it, so I don't have to duplicate 
the before_filter. I was trying to be simple and make a request to a 
controller that descends from base_controller, thinking that if it got 
through and didn't redirect to the error page, it worked. How would you 
suggest I test that


More information about the rspec-users mailing list