Ruby on Rails

Timecop 0.3.2 Released

Timecop 0.3.2 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:

Maintenance

  • Fix various timezone-related issues. Notably, when traveling to a DateTime instance specified in a non-local timezone, convert provided DateTime instance to a local instance and return that from DateTime.now. Code contributed by Michaël Witrant [piglop].
  • Fix bug that would not allow Timecop to be used when Ruby's 'date' library had not been previously loaded. Code contributed by Tuomas Kareinen [tuomas].
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.