aboutsummaryrefslogtreecommitdiffstats
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-03-08 13:56:16 -0800
committerLouise Crow <louise.crow@gmail.com>2013-03-08 13:56:16 -0800
commitb35cc2dc6a8a050d7e1ddedb1e792b56014e68e2 (patch)
treeac6b324d26d94f7563b1a2b14ebc42c1f78220f1 /spec/spec_helper.rb
parent76e52e9ba6c494ce45d4b0e9a8b56a694be31325 (diff)
parent4fd235d470c7e0055044d3926736c1afaa9cfb40 (diff)
Merge remote-tracking branch 'openaustralia_github/add_coverage_testing' into develop
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index b760c6385..b04ed4b54 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,3 +1,16 @@
+require 'simplecov'
+require 'coveralls'
+
+# Generate coverage locally in html as well as in coveralls.io
+SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
+ SimpleCov::Formatter::HTMLFormatter,
+ Coveralls::SimpleCov::Formatter
+]
+SimpleCov.start('rails') do
+ add_filter 'commonlib'
+ add_filter 'vendor/plugins'
+end
+
# This file is copied to ~/spec when you run 'ruby script/generate rspec'
# from the project root directory.
ENV["RAILS_ENV"] = 'test'