class ActiveSupport::TestCase

def parallelize_teardown(&block)

end
end
# drop databases
parallelize_teardown do
class ActiveSupport::TestCase

In your +test_helper.rb+ add the following:

Note: this feature is not available with the threaded parallelization.

the tests finish. This runs before the forked process is closed.
if your app uses multiple write/read databases or other clean up before
Clean up hook for parallel testing. This can be used to drop databases
def parallelize_teardown(&block)
  ActiveSupport::Testing::Parallelization.run_cleanup_hook(&block)
end