From 67d1d8016c92d114fa9ed33be90aa700c80140c7 Mon Sep 17 00:00:00 2001 From: mlincoln Date: Tue, 18 Jun 2013 17:12:14 -0500 Subject: [PATCH] The actual simplecov/coveralls setup. The use of Process.pid is an attempt to avoid confusing SimpleCov when running tests in parallel. Other tests frameworks take a similar approach when they detect parallel_tests. --- tests/helper.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/helper.rb b/tests/helper.rb index d9932ca44..4191a684f 100644 --- a/tests/helper.rb +++ b/tests/helper.rb @@ -1,3 +1,14 @@ +require 'simplecov' +require 'coveralls' + +SimpleCov.command_name "shindo:#{Process.pid.to_s}" +SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[ + SimpleCov::Formatter::HTMLFormatter, + Coveralls::SimpleCov::Formatter +] +SimpleCov.merge_timeout 3600 +SimpleCov.start if Gem::Version.new(RUBY_VERSION) > Gem::Version.new('1.9') + ENV['FOG_RC'] = ENV['FOG_RC'] || File.expand_path('../.fog', __FILE__) ENV['FOG_CREDENTIAL'] = ENV['FOG_CREDENTIAL'] || 'default'