From b6f3c0c3a6a4bb2bc87e6da776d8ebe44b609182 Mon Sep 17 00:00:00 2001 From: Mattia Roccoberton Date: Sat, 22 Mar 2025 09:08:36 +0100 Subject: [PATCH] test: Setup coverage --- .gitignore | 1 + Gemfile | 1 + spec/rails_helper.rb | 3 +++ 3 files changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 3cad262..0056dbd 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ /Gemfile.lock /_misc/ +/coverage/ /spec/dummy/db/*.sqlite3* /spec/dummy/log/ /spec/dummy/storage/ diff --git a/Gemfile b/Gemfile index 3ec6b4f..cce740d 100644 --- a/Gemfile +++ b/Gemfile @@ -34,6 +34,7 @@ gem 'cuprite' gem 'rspec_junit_formatter' gem 'rspec-rails' gem 'rspec-retry' +gem 'simplecov', require: false # Linters gem 'fasterer' diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 0af914f..4679cc8 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -4,6 +4,9 @@ require_relative 'spec_helper' ENV['RAILS_ENV'] = 'test' +require 'simplecov' +SimpleCov.start 'rails' + require File.expand_path('dummy/config/environment.rb', __dir__) abort('The Rails environment is running in production mode!') if Rails.env.production?