Fix a date-based issue in the project tests

Due to time zone issues, this test was failing for me because it was
attempting to compare a date in my local time zone with a UTC date.
This commit is contained in:
Matt Rogers 2013-07-29 21:43:05 -05:00
parent 07a983ca1c
commit 6c695aa61a

View file

@ -134,7 +134,7 @@ class Project < ActiveRecord::Base
end
def age_in_days
@age_in_days ||= (Date.today - created_at.to_date + 1).to_i
@age_in_days ||= ((Time.now.utc - created_at).to_i / 1.day) + 1
end
end