start fiingx failing cucumber scenario's and some small fixes

new capybara introduces some failing scenario's
This commit is contained in:
Reinier Balt 2012-12-23 23:16:22 +01:00
parent c8d2db6fc3
commit da2bee2e53
10 changed files with 42 additions and 19 deletions

View file

@ -10,14 +10,10 @@ class DoneTodos
end
def self.done_this_week(todos, includes = {:include => Todo::DEFAULT_INCLUDES})
start_of_this_week = Time.zone.now.beginning_of_week
start_of_this_day = Time.zone.now.beginning_of_day
todos.completed_before(start_of_this_day).completed_after(start_of_this_week).all(includes)
todos.completed_before(Time.zone.now.beginning_of_day).completed_after(Time.zone.now.beginning_of_week).all(includes)
end
def self.done_this_month(todos, includes = {:include => Todo::DEFAULT_INCLUDES})
start_of_this_month = Time.zone.now.beginning_of_month
start_of_this_week = Time.zone.now.beginning_of_week
todos.completed_before(start_of_this_week).completed_after(start_of_this_month).all(includes)
todos.completed_before(Time.zone.now.beginning_of_week).completed_after(Time.zone.now.beginning_of_month).all(includes)
end
end