[rspec-users] DateTime.now.utc in fixtures
mail at russellquinn.com
Wed Oct 13 01:54:56 EDT 2010
Great. Thanks for all the answers.
On Oct 12, 5:51 am, Rick DeNatale <rick.denat... at gmail.com> wrote:
> On Tue, Oct 12, 2010 at 6:06 AM, Thomas R. Koll <tom... at gmx.de> 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::Unithttp://talklikeaduck.denhaven2.com/2007/07/18/time-flies-while-youre-...
> More recently I've been using timecop
> It allows time to be either frozen or offset, and it stubs Time,
> DateTime and Date to do the right thing.
> Rick DeNatale
> Help fund my talk at Ruby Conf 2010:http://pledgie.com/campaigns/13677
> Twitter: @RickDeNatale
> rspec-users mailing list
> rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users
More information about the rspec-users