Skip to content

Commit 4f6da24

Browse files
committed
Always round covered strength to 2 digits
I don't think it matters if it's rounded up or down. The point here is that we render it the same way in the header as we do in the table.
1 parent 7165c14 commit 4f6da24

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

views/file_list.erb

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
covered at
88
<span class="covered_strength">
99
<span class="<%= strength_css_class(source_files.covered_strength) %>">
10-
<%= source_files.covered_strength %>
10+
<%= sprintf("%.2f", source_files.covered_strength) %>
1111
</span>
1212
</span> hits/line
1313
)
@@ -63,7 +63,7 @@
6363
<td class="cell--number"><%= source_file.covered_lines.count + source_file.missed_lines.count %></td>
6464
<td class="cell--number"><%= source_file.covered_lines.count %></td>
6565
<td class="cell--number"><%= source_file.missed_lines.count %></td>
66-
<td class="cell--number"><%= sprintf("%.2f", source_file.covered_strength.round(2)) %></td>
66+
<td class="cell--number"><%= sprintf("%.2f", source_file.covered_strength) %></td>
6767
<% if branchable_result? %>
6868
<td class="strong cell--number t-file__branch-coverage"><%= covered_percent(source_file.branches_coverage_percent) %></td>
6969
<td class="cell--number"><%= source_file.total_branches.count %></td>

0 commit comments

Comments
 (0)