[rspec-users] DateTime.now.utc in fixtures

Thomas R. Koll tomk32 at gmx.de
Tue Oct 12 06:06:00 EDT 2010


It might sound strange, but you usually stub Time.now
Read here: http://ariejan.net/2008/11/05/rspecing-with-timenow/

Am 09.10.2010 um 02:20 schrieb Russell Quinn:

> I have the following in my fixtures:
> publish_date: <%= DateTime.now.utc - 1.day %>
> But 'DateTime.now.utc' always evaluates to my system time. Does anyone
> have any ideas?

Thomas R. "TomK32" Koll
just a geek trying to change the world
http://ananasblau.com || http://photostre.am || http://photolog.at

More information about the rspec-users mailing list