We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00ccb50 commit c2d3e29Copy full SHA for c2d3e29
lib/rails_stats/json_formatter.rb
@@ -5,9 +5,9 @@ class JSONFormatter < StatsFormatter
5
def result
6
@result = @statistics.map { |key, stats| stat_hash(key, stats) }
7
8
- if @grand_total
9
- @result << stat_hash("Total", @grand_total).merge(code_test_hash)
10
- end
+ @result << stat_hash("Total", @grand_total).merge(code_test_hash) if @grand_total
+ @result << stat_hash("Total", @tests_total).merge(code_test_hash) if @tests_total
+ @result << stat_hash("Total", @code_total).merge(code_test_hash) if @code_total
11
12
@result
13
end
0 commit comments