module SimpleCov
def install_at_exit_hook
using `start_tracking` directly instead of `start`.
pipeline themselves (e.g., dogfood test setups) can skip it by
safe to call multiple times. Callers that drive the formatting
checks. `SimpleCov.start` calls this automatically. Idempotent —
Install the at_exit hook that formats results and runs exit-code
def install_at_exit_hook return if @at_exit_hook_installed @at_exit_hook_installed = true # Never defer in a forked child: Minitest pins its after_run at_exit # to the pid that armed autorun, so the deferral target can't fire # there and the child's resultset would be silently dropped. See # issue #1227. defer_to_minitest_after_run if minitest_autorun_pending? && !forked_subprocess? Kernel.at_exit do next if SimpleCov.external_at_exit? SimpleCov.at_exit_behavior end end