[rspec-users] restful_authentication's "permission_denied" and rspec

Ramon Tayag ramon.tayag at gmail.com
Fri Nov 21 09:20:51 EST 2008

Hi everyone,

WIth restful_authentication you get a method "permission_denied" that
you just slap onto the controller when you don't want a user to gain
access to something.  In this method Rails does a bunch of stuff then
basically tries to be smart and redirects the user somewhere else.

I want to test that this occurs given certain conditions but I don't
know how to "should_receive" this or something.

This definitely doesn't work but it should explain what I'm trying to do:

How would I go about this?

Thank you,
Ramon Tayag

More information about the rspec-users mailing list