blob: 5ad829eda2612a5fbe46d3d6d8d094cf1c580fea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
require 'simplecov'
require 'simplecov_json_formatter'
#require 'simplecov_small_badge'
# SimpleCovSmallBadge fix
=begin
SimpleCovSmallBadge::Formatter.class_eval do
private
def state(covered_percent)
if SimpleCov.minimum_coverage[:line]&.positive?
if covered_percent >= SimpleCov.minimum_coverage[:line]
'good'
else
'bad'
end
else
'unknown'
end
end
end
=end
SimpleCov.start do
SimpleCov.add_filter 'tests'
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new([
SimpleCov::Formatter::HTMLFormatter,
SimpleCov::Formatter::JSONFormatter
#SimpleCovSmallBadge::Formatter
])
end
require 'minitest/autorun'
|