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:
parent
b64524d6fd
commit
7fff2f9fe3
1 changed files with 1 additions and 1 deletions
|
@ -131,7 +131,7 @@ module AbstractController
|
||||||
end
|
end
|
||||||
|
|
||||||
def authenticate
|
def authenticate
|
||||||
@list = []
|
@list ||= []
|
||||||
@authenticated = "true"
|
@authenticated = "true"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue