spec/support/simplecov_helper.rb in modis-1.3.0 vs spec/support/simplecov_helper.rb in modis-1.4.0

- old
+ new

@@ -5,15 +5,19 @@ def start_simple_cov(name) SimpleCov.start do add_filter '/spec/' command_name name + formatters = [SimpleCov::Formatter::QualityFormatter] + if ENV['TRAVIS'] - require 'coveralls' - formatter SimpleCov::Formatter::MultiFormatter[SimpleCov::Formatter::QualityFormatter, - Coveralls::SimpleCov::Formatter] - else - formatter SimpleCov::Formatter::QualityFormatter + require 'codeclimate-test-reporter' + + if CodeClimate::TestReporter.run? + formatters << CodeClimate::TestReporter::Formatter + end end + + formatter SimpleCov::Formatter::MultiFormatter[*formatters] end end end