Skip to content

Commit c81b52d

Browse files
committed
branchable_result?, line_status?, and output_message can be private
1 parent f6dc4ab commit c81b52d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/simplecov-html.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,7 @@ def format(result)
3737
puts output_message(result)
3838
end
3939

40-
def output_message(result)
41-
output = "Coverage report generated for #{result.command_name} to #{output_path}."
42-
output += "\nLine Coverage: #{result.covered_percent.round(2)}% (#{result.covered_lines} / #{result.total_lines})"
43-
output += "\nBranch Coverage: #{result.coverage_statistics[:branch].percent.round(2)}% (#{result.covered_branches} / #{result.total_branches})" if branchable_result?
44-
output
45-
end
40+
private
4641

4742
def branchable_result?
4843
# cached in initialize because we truly look it up a whole bunch of times
@@ -59,7 +54,12 @@ def line_status?(source_file, line)
5954
end
6055
end
6156

62-
private
57+
def output_message(result)
58+
output = "Coverage report generated for #{result.command_name} to #{output_path}."
59+
output += "\nLine Coverage: #{result.covered_percent.round(2)}% (#{result.covered_lines} / #{result.total_lines})"
60+
output += "\nBranch Coverage: #{result.coverage_statistics[:branch].percent.round(2)}% (#{result.covered_branches} / #{result.total_branches})" if branchable_result?
61+
output
62+
end
6363

6464
# Returns the an erb instance for the template of given name
6565
def template(name)

0 commit comments

Comments
 (0)