Forum: Ruby on Rails before_filter not executed in functional tests

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
3504745159d79c585e4f7df8df76aa10?d=identicon&s=25 Ingo Weiss (ingoweiss)
on 2007-01-13 23:21

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

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

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

This topic is locked and can not be replied to.