Skip to content

Commit

Permalink
Reset callbacks after test.
Browse files Browse the repository at this point in the history
Otherwise the state of callback chain is leaked.
  • Loading branch information
zuhao committed Jun 5, 2014
1 parent 1c39310 commit 5faf77f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions actionpack/test/dispatch/reloader_test.rb
Expand Up @@ -3,6 +3,11 @@
class ReloaderTest < ActiveSupport::TestCase
Reloader = ActionDispatch::Reloader

teardown do
Reloader.reset_callbacks :prepare
Reloader.reset_callbacks :cleanup
end

def test_prepare_callbacks
a = b = c = nil
Reloader.to_prepare { |*args| a = b = c = 1 }
Expand Down

0 comments on commit 5faf77f

Please sign in to comment.