diff options
author | Neeraj Singh <neerajdotname@gmail.com> | 2011-06-08 03:36:45 -0400 |
---|---|---|
committer | Neeraj Singh <neerajdotname@gmail.com> | 2011-06-08 10:51:10 -0400 |
commit | 7fff2f9fe3b6d813b876842f45b26ed1beb7f7f8 (patch) | |
tree | e37959f9b49573563a522ace7445185163606124 /actionpack | |
parent | b64524d6fdacdd03277efd7b12ff0e8fa97737e2 (diff) | |
download | rails-7fff2f9fe3b6d813b876842f45b26ed1beb7f7f8.tar.gz rails-7fff2f9fe3b6d813b876842f45b26ed1beb7f7f8.tar.bz2 rails-7fff2f9fe3b6d813b876842f45b26ed1beb7f7f8.zip |
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.
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/abstract/callbacks_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |