From f4ae46b3261f5e37e36882af87d0903896dbea25 Mon Sep 17 00:00:00 2001 From: Marc Siegel Date: Sun, 7 Jul 2013 19:09:04 -0400 Subject: [PATCH] Exclude /spec/ from code coverage. Weirdly, on coveralls.io, only Rubinius (rbx-19mode) shows a 1% lack in coverage due to a line in docile_spec.rb. This should ensure that the spec files are never measured for code coverage. --- spec/spec_helper.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 4ab2f2e..f46df08 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -9,7 +9,9 @@ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[ SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter ] -SimpleCov.start +SimpleCov.start do + add_filter "/spec/" +end test_dir = File.dirname(__FILE__) $LOAD_PATH.unshift test_dir unless $LOAD_PATH.include?(test_dir)