mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-26 09:04:07 +01:00
Fix failing tests
This commit is contained in:
parent
a690e4a4cd
commit
a4ae0c03bf
2 changed files with 25 additions and 19 deletions
|
|
@ -26,14 +26,14 @@ module Stats
|
|||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def sum
|
||||
@sum ||= totals.inject(0) do |sum, amount|
|
||||
sum + amount
|
||||
@sum ||= totals.inject(0) do |sum, total|
|
||||
sum + total
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def pie_cutoff
|
||||
10
|
||||
end
|
||||
|
|
@ -43,8 +43,8 @@ module Stats
|
|||
end
|
||||
|
||||
def subtotal(from, to)
|
||||
totals[from..to].inject(0) do |sum, amount|
|
||||
sum + amount
|
||||
totals[from..to].inject(0) do |sum, total|
|
||||
sum + total
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue