class method
self.parallelize_teardown
Ruby on Rails 6.1.7.10
Since v6.0.6Signature
self.parallelize_teardown(&block)
Clean up hook for parallel testing. This can be used to drop databases if your app uses multiple write/read databases or other clean up before the tests finish. This runs before the forked process is closed.
Note: this feature is not available with the threaded parallelization.
In your test_helper.rb add the following:
class ActiveSupport::TestCase parallelize_teardown do # drop databases end end
Parameters
-
blockblock
Source
# File activesupport/lib/active_support/test_case.rb, line 128
def parallelize_teardown(&block)
ActiveSupport::Testing::Parallelization.run_cleanup_hook do |worker|
yield worker
end
end
Defined in activesupport/lib/active_support/test_case.rb line 128
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::TestCase