Refactor last year chart

Pulled some instance variable assignment into the controller.

Also extracted a method regarding interpolated values for the present
month.
This commit is contained in:
Don Cruse 2013-07-18 16:13:01 -05:00
parent 0877bf9ab8
commit 1493304fc1
3 changed files with 26 additions and 28 deletions

View file

@ -172,9 +172,6 @@ class StatsControllerTest < ActionController::TestCase
# only tests difference with actions_done_last_12months_data
# Then the count of months should be calculated
assert_equal 27, assigns['month_count'], "two years and three months of last todo"
# And the last two months are corrected
assert_equal 2/3.0, assigns['actions_done_avg_last_months_array'][23]
assert_equal 2/3.0, assigns['actions_done_avg_last_months_array'][24]