module SimpleCov::Configuration
def at_fork(&block)
end
end
SimpleCov.start
# start
SimpleCov.minimum_coverage 0
SimpleCov.formatter SimpleCov::Formatter::SimpleFormatter
SimpleCov.print_error_status = false
# be quiet, the parent process will be in charge of using the regular formatter and checking coverage totals
SimpleCov.command_name "#{SimpleCov.command_name} (subprocess: #{pid})"
# This needs a unique name so it won't be ovewritten
SimpleCov.start do
SimpleCov.at_fork do |pid|
Configure with:
By default, it will add " (Process #{pid})" to the command_name, and start SimpleCov in quiet mode
Gets or sets the behavior to start a new forked Process.
def at_fork(&block) @at_fork = block if block_given? @at_fork ||= lambda { |pid| # This needs a unique name so it won't be ovewritten SimpleCov.command_name "#{SimpleCov.command_name} (subprocess: #{pid})" # be quiet, the parent process will be in charge of using the regular formatter and checking coverage totals SimpleCov.print_error_status = false SimpleCov.formatter SimpleCov::Formatter::SimpleFormatter SimpleCov.minimum_coverage 0 # start SimpleCov.start } end