From cc189fa48f8f9fcae421bacecafea24ed4fdd3bf Mon Sep 17 00:00:00 2001 From: Viktor Koves Date: Tue, 27 Feb 2018 00:55:02 -0600 Subject: [PATCH] Installed SimpleCov and fixed coverage running on tests and config Coverage was artificially inflated due to checking /tests and /config --- Gemfile | 3 +++ Gemfile.lock | 1 + test/test_helper.rb | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/Gemfile b/Gemfile index be4554d7..9ddea99b 100644 --- a/Gemfile +++ b/Gemfile @@ -92,5 +92,8 @@ gem 'rails-settings-ui' # For controller tests gem 'rails-controller-testing' +# Add SimpleCov for code coverage & coveralls config +gem 'simplecov', require: false, group: :test + # Add Coveralls for code coverage badge & tracking gem 'coveralls', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 0b55c165..84f62f81 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -265,6 +265,7 @@ DEPENDENCIES rails-settings-cached rails-settings-ui sass-rails (~> 5.0) + simplecov spring spring-watcher-listen (~> 2.0.0) sqlite3 diff --git a/test/test_helper.rb b/test/test_helper.rb index 707d3422..cd8bfd87 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,7 +1,13 @@ # Add Coveralls +require 'simplecov' require 'coveralls' Coveralls.wear! +SimpleCov.start do + add_filter "/test/" + add_filter "/config/" +end + ENV['RAILS_ENV'] ||= 'test' require File.expand_path('../../config/environment', __FILE__) require 'rails/test_help'