From 7fff2f9fe3b6d813b876842f45b26ed1beb7f7f8 Mon Sep 17 00:00:00 2001 From: Neeraj Singh Date: Wed, 8 Jun 2011 03:36:45 -0400 Subject: Make test meaningful If before_filter list was being called mistakenly then the test should fail. However test will not fail because second filter is assigning new values to @list. To truly test that first before_filter is not called when it should not be called then @list should not assigned value unconditionally. This patch will make the test fail if first filter is called. --- actionpack/test/abstract/callbacks_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack') diff --git a/actionpack/test/abstract/callbacks_test.rb b/actionpack/test/abstract/callbacks_test.rb index 3bdde86291..5d1a703c55 100644 --- a/actionpack/test/abstract/callbacks_test.rb +++ b/actionpack/test/abstract/callbacks_test.rb @@ -131,7 +131,7 @@ module AbstractController end def authenticate - @list = [] + @list ||= [] @authenticated = "true" end end -- cgit v1.2.3