From 8b82dedb4cb78604ab5ba7b5e72be5ecfb95c58f Mon Sep 17 00:00:00 2001 From: Chris Kampmeier Date: Fri, 22 Nov 2013 14:10:01 -0800 Subject: [PATCH] Enable simultaneous test runs by interpolating TEST_ENV_NUMBER into simplecov's dir name Otherwise, the test runners overwrite each other's coverage data, producing false negatives. TEST_ENV_NUMBER is the variable used in parallel_tests for database names, etc. --- test/helpers/start_simplecov.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/test/helpers/start_simplecov.rb b/test/helpers/start_simplecov.rb index 959daf6..8609a23 100644 --- a/test/helpers/start_simplecov.rb +++ b/test/helpers/start_simplecov.rb @@ -13,6 +13,7 @@ def start_simplecov minimum_coverage 100 if this_process_responsible_for_coverage_reporting? command_name SIMPLECOV_COMMAND_NAME if child_test_process? formatter simplecov_formatter_class + coverage_dir "coverage/#{ENV['TEST_ENV_NUMBER']}" if !ENV['TEST_ENV_NUMBER'].nil? end end