SmartLogic Logo (443) 451-3001

The SmartLogic Blog

SmartLogic is a web and mobile product development studio based in Baltimore. Contact us for help building your product or visit our website to learn more about what we do.

Timecop 0.3.0 Released

September 20th, 2009 by

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,, and in a single call.

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

Updates include:


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


  • 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


  • Clearer examples in the README, better description in the gemspec
  • Improve RDoc
  • Evan Light

    Great lightning talk on this at Ruby DCamp this past weekend. I’ll almost certainly be using Timecop for time-based testing in the future.

John Trupiano co-founded SmartLogic with Yair Flicker in May 2005 and was co-president through 2011. Check out his GitHub Projects or follow @jtrupiano on Twitter.

John Trupiano's posts