class method self.parallelize_before_fork

Ruby on Rails 8.1.3.1

Since v8.1.3.1

Available 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

block block
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

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close