[rspec-users] Specs of code that use Time.now

Courtenay court3nay at gmail.com
Tue Feb 13 13:18:46 EST 2007


On 2/13/07, Ashley Moran <work at ashleymoran.me.uk> wrote:
> > def Time.now
> >   Time.local(2006,12,01,0,0,0)
> > end
> >
> > Then all dates are fixed (1 day from now is 2006-12-02 for example).
> > No clue if this is best practise, works well here though.
>
> Does this not interfere with RSpec?  I noticed it calling Time.now
> four times without any code on my part.  I suppose something has to
> give though
>

Dunno :)  May be it's using time.now or benchmark to time things.


More information about the rspec-users mailing list