1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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.
This commit is contained in:
Neeraj Singh 2011-06-08 03:36:45 -04:00
parent b64524d6fd
commit 7fff2f9fe3

View file

@ -131,7 +131,7 @@ module AbstractController
end end
def authenticate def authenticate
@list = [] @list ||= []
@authenticated = "true" @authenticated = "true"
end end
end end