mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 23:30:12 +01:00
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:
parent
c53a5ad1f2
commit
62ef5db39d
1 changed files with 8 additions and 0 deletions
|
|
@ -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.
|
||||||
#
|
#
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue