Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Neeraj Singh committed Jun 8, 2011
1 parent b64524d commit 7fff2f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actionpack/test/abstract/callbacks_test.rb
Expand Up @@ -131,7 +131,7 @@ def list
end

def authenticate
@list = []
@list ||= []
@authenticated = "true"
end
end
Expand Down

0 comments on commit 7fff2f9

Please sign in to comment.