Class: MissCleo::CoverageFilter

Inherits:
Object
  • Object
show all
Defined in:
lib/miss_cleo/coverage_filter.rb

Constant Summary collapse

GEM_PATHS =
ENV["GEM_PATH"].split(":")
RUBY_PATH =
`which ruby`.chomp.gsub("/bin/ruby","")

Class Method Summary collapse

Class Method Details

.filter_core(result_hash) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/miss_cleo/coverage_filter.rb', line 6

def self.filter_core(result_hash)

  # Don't include gems in coverage map
  result_hash.reject do |file, line|
    ([RUBY_PATH] + GEM_PATHS).any? { |path| file.include?(path) }
  end
end