aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/testing/setup_and_teardown_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* `SetupAndTeardown#teardown` should call any subsequent after_teardown:Edouard CHIN2018-04-061-0/+34
If you have a regular test that have a teardown block, and for any reason an exception get raised, ActiveSupport will not run subsequent after_teardown method provided by other module or gems. One of them being the ActiveRecord::TestFixtures which won't rollback the transation when the test ends making all subsequent test to be in a weird state. The default implementation of minitest is to run all teardown methods from the user's test, rescue all exceptions, run all after_teardown methods provided by libraries and finally re-raise the exception that happened in the user's teardown method. Rails should do the same.