diff options
author | Zuhao Wan <wanzuhao@gmail.com> | 2014-06-05 22:30:53 +0800 |
---|---|---|
committer | Zuhao Wan <wanzuhao@gmail.com> | 2014-06-05 22:30:53 +0800 |
commit | 5faf77fe7abffed40e3a4110cf33f83c99e90ce4 (patch) | |
tree | 1e0a4a49223a7603707b8d7ae7e6cffecb7d0f3a /actionpack | |
parent | 1c39310637599df879c0412672f35d3990b61afb (diff) | |
download | rails-5faf77fe7abffed40e3a4110cf33f83c99e90ce4.tar.gz rails-5faf77fe7abffed40e3a4110cf33f83c99e90ce4.tar.bz2 rails-5faf77fe7abffed40e3a4110cf33f83c99e90ce4.zip |
Reset callbacks after test.
Otherwise the state of callback chain is leaked.
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/dispatch/reloader_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/reloader_test.rb b/actionpack/test/dispatch/reloader_test.rb index ce9ccfcee8..62e8197e20 100644 --- a/actionpack/test/dispatch/reloader_test.rb +++ b/actionpack/test/dispatch/reloader_test.rb @@ -3,6 +3,11 @@ require 'abstract_unit' 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 } |