class method
self.parallelize_before_fork
Ruby on Rails edge
Since v8.1.3.1Available in: v8.1.3.1 edge
Signature
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 153
def parallelize_before_fork(&block)
ActiveSupport::Testing::Parallelization.before_fork_hook(&block)
end
Defined in activesupport/lib/active_support/test_case.rb line 153
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::TestCase