From 5faf77fe7abffed40e3a4110cf33f83c99e90ce4 Mon Sep 17 00:00:00 2001 From: Zuhao Wan Date: Thu, 5 Jun 2014 22:30:53 +0800 Subject: Reset callbacks after test. Otherwise the state of callback chain is leaked. --- actionpack/test/dispatch/reloader_test.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'actionpack/test/dispatch/reloader_test.rb') 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 } -- cgit v1.2.3