@@ -46,12 +55,18 @@
Lines covered |
Lines missed |
Avg. Hits / Line |
- <% if branchable_result? %>
+ <% if branch_coverage? %>
Branch Coverage |
Branches |
Covered branches |
Missed branches |
<% end %>
+ <% if method_coverage? %>
+ Method Coverage |
+ Methods |
+ Covered methods |
+ Missed methods |
+ <% end %>
@@ -64,12 +79,18 @@
<%= source_file.covered_lines.count %> |
<%= source_file.missed_lines.count %> |
<%= sprintf("%.2f", source_file.covered_strength.round(2)) %> |
- <% if branchable_result? %>
+ <% if branch_coverage? %>
<%= sprintf("%.2f", source_file.branches_coverage_percent.round(2)) %> % |
<%= source_file.total_branches.count %> |
<%= source_file.covered_branches.count %> |
<%= source_file.missed_branches.count %> |
<% end %>
+ <% if method_coverage? %>
+ <%= sprintf("%.2f", source_file.methods_coverage_percent.round(2)) %> % |
+ <%= source_file.total_methods.count %> |
+ <%= source_file.covered_methods.count %> |
+ <%= source_file.missed_methods.count %> |
+ <% end %>
<% end %>
diff --git a/views/layout.erb b/views/layout.erb
index 72c60af..2c77744 100644
--- a/views/layout.erb
+++ b/views/layout.erb
@@ -8,7 +8,7 @@
" />
- >
+ >
diff --git a/views/source_file.erb b/views/source_file.erb
index e4f3a71..7189ed8 100644
--- a/views/source_file.erb
+++ b/views/source_file.erb
@@ -6,20 +6,28 @@
lines covered
- <% if branchable_result? %>
+ <% if branch_coverage? %>
<%= covered_percent(source_file.branches_coverage_percent) %>
branches covered
<% end %>
+ <% if method_coverage? %>
+
+ <%= covered_percent(source_file.methods_coverage_percent) %>
+ methods covered
+
+ <% end %>
+
+
<%= source_file.lines_of_code %> relevant lines.
<%= source_file.covered_lines.count %> lines covered and
<%= source_file.missed_lines.count %> lines missed.
- <% if branchable_result? %>
+ <% if branch_coverage? %>
<%= source_file.total_branches.count %> total branches,
<%= source_file.covered_branches.count %> branches covered and
@@ -27,6 +35,25 @@
<% end %>
+ <% if method_coverage? %>
+
+ <%= source_file.total_methods.count %> total methods,
+ <%= source_file.covered_methods.count %> methods covered and
+ <%= source_file.missed_methods.count %> methods missed.
+
+ <% end %>
+
+ <% if method_coverage? && source_file.missed_methods.any? %>
+
+
Missed methods:
+
+ <% source_file.missed_methods.each do |missed_method| %>
+ - <%= CGI.escapeHTML(missed_method.to_s) %>
+ <% end %>
+
+
+ <% end %>
+
@@ -40,7 +67,7 @@
skipped
<% end %>
- <% if branchable_result? %>
+ <% if branch_coverage? %>
<% source_file.branches_for_line(line.number).each do |branch_type, hit_count| %>
<%= branch_type %>: <%= hit_count %>