From 36677b1d062d83ca1118a9c6f73ce6c5f78a07f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Bald=C3=A3o?= Date: Wed, 19 Aug 2020 20:24:04 -0300 Subject: [PATCH] add simplecov (#862) 100% test coverage is not a goal in and of itself. --- .gitignore | 1 + Gemfile | 1 + Gemfile.lock | 6 ++++++ spec/rails_helper.rb | 2 ++ 4 files changed, 10 insertions(+) diff --git a/.gitignore b/.gitignore index 06b3f3d4..798ebab3 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ public/assets public/avatars public/sitemap* node_modules/ +coverage/ yarn-error.log yarn.lock .byebug* diff --git a/Gemfile b/Gemfile index 63e28358..a1aa82c3 100644 --- a/Gemfile +++ b/Gemfile @@ -57,4 +57,5 @@ group :test, :development do gem "rb-readline" gem "vcr" gem "webmock" # used to support vcr + gem 'simplecov', require: false end diff --git a/Gemfile.lock b/Gemfile.lock index 19c45319..bd0ceab5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -88,6 +88,7 @@ GEM crass (1.0.6) database_cleaner (1.8.5) diff-lcs (1.4.4) + docile (1.3.2) erubi (1.9.0) exception_notification (4.4.3) actionmailer (>= 4.0, < 7) @@ -235,6 +236,10 @@ GEM scenic-mysql_adapter (1.0.1) mysql2 scenic (>= 1.4.0) + simplecov (0.18.5) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov-html (0.12.2) sitemap_generator (6.1.2) builder (~> 3.0) sprockets (3.7.2) @@ -308,6 +313,7 @@ DEPENDENCIES ruumba scenic scenic-mysql_adapter + simplecov sitemap_generator sprockets-rails (= 2.3.3) svg-graph diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 985783f8..180c7d86 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -2,7 +2,9 @@ ENV["RAILS_ENV"] ||= 'test' require File.expand_path("../../config/environment", __FILE__) require 'rspec/rails' +require 'simplecov' +SimpleCov.start 'rails' # Requires supporting ruby files with custom matchers and macros, etc, # in spec/support/ and its subdirectories. Dir[Rails.root.join("spec/support/**/*.rb")].sort.each {|f| require f }