fix regressions and use timecop to fix time in tests. Thanks Dan and Hans!

This commit is contained in:
Reinier Balt 2013-01-06 16:01:53 +01:00
parent 0d169c4a97
commit e59fa387fa
7 changed files with 78 additions and 79 deletions

View file

@ -10,7 +10,7 @@ class DoneTodos
end
def self.done_this_week(todos, includes = {:include => Todo::DEFAULT_INCLUDES})
done_between(todos, Time.zone.now.beginning_of_day, Time.zone.now.beginning_of_week)
done_between(todos, includes, Time.zone.now.beginning_of_day, Time.zone.now.beginning_of_week)
end
def self.done_this_month(todos, includes = {:include => Todo::DEFAULT_INCLUDES})