Ruby on Rails

Timecop 0.3.0 Released

Timecop 0.3.0 has just been released. To install simply run: gem install timecop.

Timecop is a RubyGem providing "time travel" and "time freezing" capabilities, making it dead simple to test time-dependent code. It provides a unified method to mock Time.now, Date.today, and DateTime.now in a single call.

Documentation is on RubyForge. The source code is hosted at GitHub.

Updates include:

API

  • Completely remove Timecop#unset_all (deprecated by Timecop#return in 0.2.0)
  • Return Time.now from #freeze, #travel and #return -- code contributed by Keith Bennett (keithrbennett)

Maintenance

  • Fix bug that left Time#mock_time set in some instances
  • Upped build dependency to jeweler ~> 1.2.1
  • Don't pollute top-level namespace with classes/constants

Documentation

  • Clearer examples in the README, better description in the gemspec
  • Improve RDoc
You've successfully subscribed to SmartLogic Blog
Great! Next, complete checkout for full access to SmartLogic Blog
Welcome back! You've successfully signed in.
Unable to sign you in. Please try again.
Success! Your account is fully activated, you now have access to all content.
Error! Stripe checkout failed.
Success! Your billing info is updated.
Error! Billing info update failed.