Time.new(...).utc is not the same as Time.utc(...). The
first creates a given date in local time, and then converts that to
utc, whereas the second creates the given time in UTC.
end
def test_friendly_date
end
def test_friendly_date
- date = friendly_date(Time.new(2014, 3, 5, 18, 58, 23).utc)
+ date = friendly_date(Time.utc(2014, 3, 5, 18, 58, 23))
assert_match %r{^<span title=" *5 March 2014 at 18:58">.*</span>$}, date
date = friendly_date(Time.now.utc - 1.hour)
assert_match %r{^<span title=" *5 March 2014 at 18:58">.*</span>$}, date
date = friendly_date(Time.now.utc - 1.hour)