Module: Process

Defined in:
lib/simplecov/process.rb

Class Method Summary collapse

Class Method Details

.fork_with_simplecov(&block) ⇒ Object Also known as: fork



5
6
7
8
9
10
11
12
13
14
# File 'lib/simplecov/process.rb', line 5

def fork_with_simplecov(&block)
  if defined?(SimpleCov) && SimpleCov.running
    fork_without_simplecov do
      SimpleCov.at_fork.call(Process.pid)
      block.call if block_given?
    end
  else
    fork_without_simplecov(&block)
  end
end