Skip to content

Commit 61173e5

Browse files
committed
output in json format for simplecov
1 parent e0c24d1 commit 61173e5

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ group :test do
1616
gem "debug"
1717
gem "rspec", "~> 3.0"
1818
gem "simplecov", require: false
19+
gem "simplecov-json", require: false
1920
end

Gemfile.lock

+5
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ GEM
7676
irb (1.10.1)
7777
rdoc
7878
reline (>= 0.3.8)
79+
json (2.7.1)
7980
minitest (5.20.0)
8081
mutex_m (0.2.0)
8182
psych (5.1.1.1)
@@ -104,6 +105,9 @@ GEM
104105
simplecov-html (~> 0.11)
105106
simplecov_json_formatter (~> 0.1)
106107
simplecov-html (0.12.3)
108+
simplecov-json (0.2.3)
109+
json
110+
simplecov
107111
simplecov_json_formatter (0.1.3)
108112
stringio (3.1.0)
109113
thor (1.2.2)
@@ -122,6 +126,7 @@ DEPENDENCIES
122126
rake (~> 13.0)
123127
rspec (~> 3.0)
124128
simplecov
129+
simplecov-json
125130

126131
BUNDLED WITH
127132
2.4.22

spec/support/coverage.rb

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# frozen_string_literal: true
22

3-
require "simplecov"
3+
require 'simplecov'
4+
require 'simplecov-json'
5+
6+
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new([
7+
SimpleCov::Formatter::HTMLFormatter,
8+
SimpleCov::Formatter::JSONFormatter
9+
])
410

511
SimpleCov.start do
612
add_filter "/spec/"

0 commit comments

Comments
 (0)