Sha256: 145552a78cb72707553663f27a8fe8cdea3de085e17e219a312992e83a9f08df
Contents?: true
Size: 591 Bytes
Versions: 14
Compression:
Stored size: 591 Bytes
Contents
# This is a complete replacement for the builtin Coverage module of Ruby require 'coverage' BuiltinCoverage = Coverage Object.send(:remove_const, 'Coverage') module Coverage def self.start @started = true DeepCover.start DeepCover.coverage.reset end def self.result raise 'coverage measurement is not enabled' unless @started @started = false self.peek end def self.peek results = DeepCover.coverage.covered_codes.map do |filename, covered_code| [filename, covered_code.line_coverage(allow_partial: false)] end Hash[results] end end
Version data entries
14 entries across 14 versions & 1 rubygems