method

parallelize_teardown

Importance_1
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: ActiveSupport::TestCase
parallelize_teardown(&block) public

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
Show source
Register or log in to add new notes.