Sha256: d1411413d6ccb11a06694cb9cd79ab46e1bcf3d20e00d620b7fd514388c2d815
Contents?: true
Size: 704 Bytes
Versions: 1
Compression:
Stored size: 704 Bytes
Contents
MINIMUM_COVERAGE = 87 unless ENV['COVERAGE'] == 'off' require 'simplecov' require 'simplecov-rcov' require 'coveralls' Coveralls.wear! SimpleCov.formatters = [ SimpleCov::Formatter::RcovFormatter, Coveralls::SimpleCov::Formatter ] SimpleCov.start do add_filter '/vendor/' add_filter '/spec/' add_filter '/lib/error_handling/' add_group 'lib', 'lib' end SimpleCov.at_exit do SimpleCov.result.format! percent = SimpleCov.result.covered_percent unless percent >= MINIMUM_COVERAGE puts '*' * 80 puts "Coverage must be above #{MINIMUM_COVERAGE}%. It is #{format('%.2f', percent)}%" puts '*' * 80 Kernel.exit(1) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ruby_core_extensions-0.0.1 | spec/support/coverage.rb |