Invoke CodeClimate and Simplecov from the test helper

Moves them out of the rake task so that we can:
 - Get coverage information locally
 - Get reporting of coverage and code climate at the unit test level

Having it at the CI level was nice to get explicit coverage for both
cucumber and the test suite but it doesn't work if the test suite
doesn't run at all.
This commit is contained in:
Matt Rogers 2018-01-03 15:37:00 -06:00
parent c53a5ad1f2
commit 62ef5db39d

View file

@ -10,6 +10,14 @@ require 'rails/test_help'
"time_zone" => "Amsterdam" # force UTC+1 so Travis triggers time zone failures "time_zone" => "Amsterdam" # force UTC+1 so Travis triggers time zone failures
}.inject( SITE_CONFIG ) { |h, elem| h[elem[0]] = elem[1]; h } }.inject( SITE_CONFIG ) { |h, elem| h[elem[0]] = elem[1]; h }
if ENV["COVERAGE"]
require "codeclimate-test-reporter"
CodeClimate::TestReporter.start
require 'simplecov'
SimpleCov.start 'rails'
end
class ActiveSupport::TestCase class ActiveSupport::TestCase
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
# #