Leave a comment

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!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: