Before_filter not executed in functional tests

Hi,

I have a before_filter ‘authorize’ defined in the application controller
that checks for a user in the session. However, when I test a controller
(that has before_filter ‘authorize’) like this:

def test_new_without_login
get :new
assert_redirected_to new_session_path
end

the fails because the response is ‘success’ instead. When I set a
breakpoint in the ‘authorize’ method I see that it is in fact never
executed.

Do I need to do something so that methods on other controllers are
executed, or is this a bug (I am using edge rails)?

Thanks!
Ingo

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs