blob: 25975f44dc8dae6e86b031c6cccfc504d035a0aa (
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
|
require 'simplecov'
require 'simplecov_small_badge'
# SimpleCovSmallBadge fix
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
SimpleCov.start do
SimpleCov.add_filter 'tests'
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new([
SimpleCov::Formatter::HTMLFormatter,
SimpleCovSmallBadge::Formatter
])
end
require 'minitest/autorun'
|