Fix failing tests

This commit is contained in:
Katrina Owen 2013-03-18 21:54:19 -06:00
parent a690e4a4cd
commit a4ae0c03bf
2 changed files with 25 additions and 19 deletions

View file

@ -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