class method
self.parallelize_before_fork
Ruby on Rails 8.1.2
Since v8.1.2Signature
self.parallelize_before_fork(&block)
Before fork hook for parallel testing. This can be used to run anything before the processes are forked.
In your test_helper.rb add the following:
class ActiveSupport::TestCase parallelize_before_fork do # run this before fork end end
Parameters
-
blockblock
Source
# File activesupport/lib/active_support/test_case.rb, line 138
def parallelize_before_fork(&block)
ActiveSupport::Testing::Parallelization.before_fork_hook(&block)
end
Defined in activesupport/lib/active_support/test_case.rb line 138
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::TestCase