File: simplecov_plugin.rb

package info (click to toggle)
ruby-simplecov 0.22.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,512 kB
  • sloc: ruby: 5,550; makefile: 10
file content (15 lines) | stat: -rw-r--r-- 411 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

# How minitest plugins. See https://github.com/simplecov-ruby/simplecov/pull/756 for why we need this.
# https://github.com/seattlerb/minitest#writing-extensions
module Minitest
  def self.plugin_simplecov_init(_options)
    if defined?(SimpleCov)
      SimpleCov.external_at_exit = true

      Minitest.after_run do
        SimpleCov.at_exit_behavior
      end
    end
  end
end