File: coverage_helper.rb

package info (click to toggle)
ruby-sequel-pg 1.18.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 204 kB
  • sloc: ansic: 1,938; ruby: 348; makefile: 2
file content (10 lines) | stat: -rw-r--r-- 341 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
require 'simplecov'

SimpleCov.start do
  enable_coverage :branch
  command_name ENV['SIMPLECOV_COMMAND_NAME']
  root File.dirname(__dir__)
  add_filter{|f| f.filename.match(%r{\A#{Regexp.escape(File.dirname(__FILE__))}/})}
  add_group('Missing'){|src| src.covered_percent < 100}
  add_group('Covered'){|src| src.covered_percent == 100}
end