We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e98c75 commit 01e3ea1Copy full SHA for 01e3ea1
spec/spec_helper.rb
@@ -4,6 +4,16 @@
4
SimpleCov.start do
5
enable_coverage :branch
6
end
7
+
8
+ SimpleCov.at_exit do
9
+ SimpleCov.result.format!
10
11
+ result = SimpleCov.result
12
+ if result.total_branches&.positive?
13
+ covered_branches_percent = 100.0 * result.covered_branches / result.total_branches
14
+ puts "Branch coverage: #{result.covered_branches} / #{result.total_branches} branches (#{covered_branches_percent.round(2)}%) covered."
15
+ end
16
17
18
19
require 'rubygems'
0 commit comments