Rails 3 provides @controller and @request as instance variables in
controller tests, whats the equivalent in rspec controller tests?
I’m using warden for authentication and need to be able to stub
@request.env[‘warden’] with something so that controllers can be
tested. Currently @request is nil (error: undefined method `env’ for
If I remember correctly the default controller specs in rails 2/rspec
1 contained this assertion:
This fails with rails 3/rspec 2 beta 3 because controller is nil.