Skip to content

Commit f75df50

Browse files
committed
nicer badges with titles
1 parent 85f622d commit f75df50

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

views/source_file.erb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@
4242
<% if line.skipped? %><span class="hits">skipped</span><% end %>
4343

4444
<% if branchable_result? %>
45-
<% if source_file.branchable_line?(line.number) %>
46-
<span class="hits">
47-
<%= source_file.branch_per_line(line.number) %>
45+
<% source_file.branches_for_line(line.number).each do |hit_count, indicator| %>
46+
<% positive_or_negative = indicator == "+" ? "positive" : "negative" %>
47+
<span class="hits" title="<%= positive_or_negative%> branch hit <%= hit_count %> times">
48+
<%= hit_count %>, <%= indicator %>
4849
</span>
4950
<% end %>
5051
<% end %>

0 commit comments

Comments
 (0)