@@ -44,11 +52,17 @@
| 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 -%>
@@ -62,11 +76,17 @@
<%= source_file.covered_lines.count %> |
<%= source_file.missed_lines.count %> |
<%= sprintf("%.2f", source_file.covered_strength) %> |
-<%- if branchable_result? -%>
+<%- if branch_coverage? -%>
<%= covered_percent(source_file.branches_coverage_percent) %> |
<%= source_file.total_branches.count %> |
<%= source_file.covered_branches.count %> |
<%= source_file.missed_branches.count %> |
+<%- end -%>
+<%- if method_coverage? -%>
+ <%= covered_percent(source_file.methods_coverage_percent) %> |
+ <%= source_file.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 440c67f..3ae9def 100644
--- a/views/layout.erb
+++ b/views/layout.erb
@@ -18,7 +18,7 @@
- >
+ >
 %>)
diff --git a/views/source_file.erb b/views/source_file.erb
index 1c68719..42d8133 100644
--- a/views/source_file.erb
+++ b/views/source_file.erb
@@ -5,23 +5,46 @@
<%= covered_percent(source_file.covered_percent) %>
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
<%= source_file.missed_branches.count %> branches missed.
+<%- end -%>
+<%- if method_coverage? -%>
+
+ <%= source_file.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| -%>
+ - <%= ERB::Util.html_escape(missed_method.to_s) %>
+<%- end -%>
+
+
<%- end -%>
@@ -33,7 +56,7 @@
<%- elsif line.skipped? -%>
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 %>
<%- end -%>