From 043d0a014dbee7f7d84968dcbb53303c8687ea56 Mon Sep 17 00:00:00 2001 From: Paul Thornthwaite Date: Tue, 28 Jan 2014 17:58:26 +0000 Subject: [PATCH] Make Coveralls opt-in Due to looking for a value of 'false' whenever I run tests locally without the `COVERAGE` env variable coverage is very slowly, still calculated - it then aborts without doing anything because I'm not using a CI setup. This adds the setting in for Travis to opt in and should exclude coverage work for anyone running tests locally. --- .travis.yml | 2 ++ tests/helper.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6dd5f4fcf..4f9abd1c1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,8 @@ gemfile: - Gemfile - Gemfile.1.8.7 +env: COVERAGE=true + rvm: - 1.8.7 - 1.9.2 diff --git a/tests/helper.rb b/tests/helper.rb index 6aa99e9eb..3ea10cab4 100644 --- a/tests/helper.rb +++ b/tests/helper.rb @@ -1,6 +1,6 @@ require 'simplecov' -if ENV['COVERAGE'] != 'false' && RUBY_VERSION != "1.9.2" +if ENV['COVERAGE'] == 'true' && RUBY_VERSION != "1.9.2" require 'coveralls' SimpleCov.command_name "shindo:#{Process.pid.to_s}" SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[