Rails Rspec total test time error

So I was getting this crazy value for the total time to run my Rspec tests.  It was like a bizarre decimal.  I never really cared until I started to try to speed up my tests.

It took me longer to find the solution than it took to fix it.  If you are not getting a actual positive number in Rspec tests it might be Timecop.  We are using Timecop and the time was frozen, hence the crazy total time.  After running a test using Timecop, just add Timecop.return.

Piece of cake!!

comments powered by Disqus