Sha256: aac7d44938df922e788db77df8331dd75dc6e661f1710ed732e848be2d038d5e
Contents?: true
Size: 599 Bytes
Versions: 1
Compression:
Stored size: 599 Bytes
Contents
def codeclimate? ENV['CODECLIMATE_REPO_TOKEN'] end def simplecov? ENV['COVERAGE'] end def coverage? simplecov? || codeclimate? end def measure_coverage require 'simplecov' formatters = [] formatters << SimpleCov::Formatter::HTMLFormatter if simplecov? if codeclimate? require 'codeclimate-test-reporter' formatters << CodeClimate::TestReporter::Formatter end ignored_directories = ['/spec/', '/vendor/', '/.bundle/'] SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[*formatters] SimpleCov.start { ignored_directories.each { |dir| add_filter(dir) } } end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
wright-0.2.0 | spec/spec_helpers/test_coverage.rb |