module ResourceHelper
DUPLICATION_SNIPPET_DEFAULT_NB_OF_LINES = 6
- def format(new, prefix, measure_name, options = {})
+ def format(new, prefix, measure_name)
if new
format_variation(measure('new_' + prefix + measure_name), :period => @period, :default => '-', :style => 'none')
else
- format_measure(measure(prefix + measure_name), options)
+ measure(prefix + measure_name).formatted_value
end
end
- def format_difference(new, prefix, measure_name1, measure_name2, options = {})
- format(new, prefix, measure_name1, options).to_i - format(new, prefix, measure_name2, options).to_i;
+ def format_difference(new, prefix, measure_name1, measure_name2)
+ format(new, prefix, measure_name1).to_i - format(new, prefix, measure_name2).to_i
end
end
\ No newline at end of file
<% [('overall_' if @display_overall_coverage), '', ('it_' if @display_it_coverage)].compact.each_with_index do |prefix, index| -%>
<tr>
<% if index == 0 -%>
- <td class="right big" style="width: 80px;"><%= format(new, prefix, 'coverage', :default => '-') -%></td>
+ <td class="right big" style="width: 80px;"><%= format(new, prefix, 'coverage') -%></td>
<td></td>
<td class="sep"></td>
<td class="name"><%= h Metric.name_for('line_coverage') -%>:</td>
/ <%= format(new, prefix, 'conditions_to_cover') -%>)
</td>
<% else -%>
- <td class="right"><%= format(new, prefix, 'coverage', :default => '-') -%></td>
+ <td class="right"><%= format(new, prefix, 'coverage') -%></td>
<td><%= message(prefix + 'coverage_viewer.by') -%></td>
<td class="sep"></td>
<td colspan="2"></td>