mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Reset callbacks after test.
Otherwise the state of callback chain is leaked.
This commit is contained in:
parent
1c39310637
commit
5faf77fe7a
1 changed files with 5 additions and 0 deletions
|
@ -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 }
|
||||
|
|
Loading…
Reference in a new issue