Skip to content

Commit 934d312

Browse files
chore(test): add and configure SimpleCov for test coverage measurement and reporting
1 parent 6938e8e commit 934d312

4 files changed

Lines changed: 16 additions & 0 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@
99

1010
# rspec failure tracking
1111
.rspec_status
12+
13+
.DS_Store
14+
coverage

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ gem "rake", "~> 13.0"
1010
gem "rspec", "~> 3.0"
1111

1212
gem "rubocop", "~> 1.21"
13+
14+
gem "simplecov", "~> 0.22", require: false, group: :test

Gemfile.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ GEM
1212
ast (2.4.3)
1313
diff-lcs (1.6.2)
1414
digest (3.2.0)
15+
docile (1.4.0)
1516
json (2.12.2)
1617
language_server-protocol (3.17.0.5)
1718
lint_roller (1.1.0)
@@ -52,6 +53,12 @@ GEM
5253
parser (>= 3.3.7.2)
5354
prism (~> 1.4)
5455
ruby-progressbar (1.13.0)
56+
simplecov (0.22.0)
57+
docile (~> 1.1)
58+
simplecov-html (~> 0.11)
59+
simplecov_json_formatter (~> 0.1)
60+
simplecov-html (0.12.3)
61+
simplecov_json_formatter (0.1.4)
5562
thor (1.3.2)
5663
unicode-display_width (3.1.4)
5764
unicode-emoji (~> 4.0, >= 4.0.4)
@@ -67,6 +74,7 @@ DEPENDENCIES
6774
rake (~> 13.0)
6875
rspec (~> 3.0)
6976
rubocop (~> 1.21)
77+
simplecov (~> 0.22)
7078

7179
BUNDLED WITH
7280
2.5.17

spec/spec_helper.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22

33
require "doc_guard"
44
require "open3"
5+
require "simplecov"
56
require "tempfile"
67
require "tmpdir"
78

9+
SimpleCov.start
10+
811
RSpec.configure do |config|
912
# Enable flags like --only-failures and --next-failure
1013
config.example_status_persistence_file_path = ".rspec_status"

0 commit comments

Comments
 (0)