From 469d194deb31728108c71188893507d576e16b6d Mon Sep 17 00:00:00 2001 From: mlshvch Date: Wed, 9 Feb 2022 04:29:49 +0300 Subject: [PATCH] Add Simplecov --- .gitignore | 2 +- Gemfile | 2 ++ Gemfile.lock | 8 ++++++++ spec/spec_helper.rb | 3 +++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 74dc9e87..936dd69f 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,7 @@ # Ignore bundler config. /.bundle - +/coverage # Ignore all logfiles and tempfiles. /log/* /tmp/* diff --git a/Gemfile b/Gemfile index 0764bb3a..1546ca8f 100644 --- a/Gemfile +++ b/Gemfile @@ -61,5 +61,7 @@ group :development do gem 'rubocop-rspec', '~> 1.44.1', require: false end +gem 'simplecov', require: false, group: :test + # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] diff --git a/Gemfile.lock b/Gemfile.lock index da124a9e..9c775264 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -96,6 +96,7 @@ GEM devise (> 3.5.2, < 5) rails (>= 4.2.0, < 6.2) diff-lcs (1.5.0) + docile (1.4.0) dotenv (2.7.6) dotenv-rails (2.7.6) dotenv (= 2.7.6) @@ -237,6 +238,12 @@ GEM ruby-progressbar (1.11.0) shoulda-matchers (5.1.0) activesupport (>= 5.2.0) + simplecov (0.21.2) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-html (0.12.3) + simplecov_json_formatter (0.1.3) spring (4.0.0) sprockets (4.0.2) concurrent-ruby (~> 1.0) @@ -285,6 +292,7 @@ DEPENDENCIES rubocop-rails (~> 2.9.1) rubocop-rspec (~> 1.44.1) shoulda-matchers (~> 5.0) + simplecov spring tzinfo-data diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 6384cd6b..b07dce93 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -11,6 +11,9 @@ # a separate helper file that requires the additional dependencies and performs # the additional setup, and require it from the spec files that actually need # it. +require 'simplecov' +SimpleCov.start + require 'pundit/rspec' require 'devise' # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration