require 'simplecov' require './spec/support/simplecov_quality_formatter' module SimpleCovHelper def start_simple_cov(name) SimpleCov.start do add_filter '/spec/' command_name name formatters = [SimpleCov::Formatter::QualityFormatter] if ENV['TRAVIS'] require 'codeclimate-test-reporter' if CodeClimate::TestReporter.run? formatters << CodeClimate::TestReporter::Formatter end end formatter SimpleCov::Formatter::MultiFormatter[*formatters] end end end