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

2010-10-12 Thread Russell Quinn
Great. Thanks for all the answers. Russell. On Oct 12, 5:51 am, Rick DeNatale wrote: > On Tue, Oct 12, 2010 at 6:06 AM, Thomas R. Koll wrote: > > > Hi, > > > It might sound strange, but you usually stub Time.now > > Read here:http://ariejan.net/2008/11/05/rspecing-with-timenow/ > > I used to do

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

2010-10-12 Thread Rick DeNatale
On Tue, Oct 12, 2010 at 6:06 AM, Thomas R. Koll wrote: > Hi, > > It might sound strange, but you usually stub Time.now > Read here: http://ariejan.net/2008/11/05/rspecing-with-timenow/ I used to do this myself even with Test::Unit http://talklikeaduck.denhaven2.com/2007/07/18/time-flies-while-you

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

2010-10-12 Thread Thomas R. Koll
Hi, 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 eva

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

2010-10-12 Thread J. B. Rainsberger
Russell Quinn wrote: 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? You might not like it, but what about fixing the date? -- J. B. Rainsberger :: http://www.jbrains.ca :

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

2010-10-11 Thread 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? Thanks, Russell. ___ rspec-users mailing list rspec-users@rubyforge.org http://ru