Sha256: 20616e520b6e391167ac2f00a9a2dd1ec4d053b7ace3f73ed7b3ab50bc7d9a8b
Contents?: true
Size: 580 Bytes
Versions: 9
Compression:
Stored size: 580 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 { add_filter(ignored_directories) } end
Version data entries
9 entries across 9 versions & 1 rubygems