From 35e2010d3c76d5432f3539a5e90b2fb03fb9d16c Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Sat, 14 Sep 2024 09:17:01 +0200 Subject: [PATCH] Fix code coverage --- .gitignore | 7 ++++--- spec/spec_helper.rb | 12 ++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 9fc184e..01c2f01 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,13 @@ +.byebug_history coverage -public doc log/* !/log/.keep -tmp/* +public +spec/examples.txt spec/output.log -.byebug_history storage/ +tmp/* # Docker docker/colore/variables.env diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index fd9c03f..d4e7565 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,15 @@ +# frozen_string_literals: true + +if ENV['COVERAGE'] + require 'simplecov' + + SimpleCov.start do + add_filter '/spec/' + + track_files 'lib/**/*.rb' + end +end + ENV['RACK_ENV'] = 'test' require 'pathname'