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

Merge pull request #15530 from zuhao/refactor_actionpack_reloader_test

Reset callbacks after test.
This commit is contained in:
Matthew Draper 2014-06-06 03:24:48 +09:30
commit 141e6e8a2f

View file

@ -3,6 +3,11 @@ require 'abstract_unit'
class ReloaderTest < ActiveSupport::TestCase class ReloaderTest < ActiveSupport::TestCase
Reloader = ActionDispatch::Reloader Reloader = ActionDispatch::Reloader
teardown do
Reloader.reset_callbacks :prepare
Reloader.reset_callbacks :cleanup
end
def test_prepare_callbacks def test_prepare_callbacks
a = b = c = nil a = b = c = nil
Reloader.to_prepare { |*args| a = b = c = 1 } Reloader.to_prepare { |*args| a = b = c = 1 }