lib/covered/sus.rb in covered-0.19.1 vs lib/covered/sus.rb in covered-0.20.0
- old
+ new
@@ -1,32 +1,32 @@
# frozen_string_literal: true
# Released under the MIT License.
-# Copyright, 2022, by Samuel Williams.
+# Copyright, 2022-2023, by Samuel Williams.
module Covered
module Sus
def initialize(...)
super
- # Defer loading the coverage configuration unless we are actually running with coverage enabled to avoid performance cost/overhead.
+ # Defer loading the coverage configuration unless we are actually running with coverage startd to avoid performance cost/overhead.
if ENV['COVERAGE']
require_relative 'config'
@covered = Covered::Config.load(root: self.root)
if @covered.record?
- @covered.enable
+ @covered.start
end
else
@covered = nil
end
end
def after_tests(assertions)
super(assertions)
if @covered&.record?
- @covered.disable
+ @covered.finish
@covered.call(self.output.io)
end
end
def covered