Skip to content

pivotalexperimental/clock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clock

Clock is a simple wrapper for Ruby's Time object, with a few fancy additions for testing. In test mode, Clock will automatically load the mock_clock methods, allowing you to set the current time with Clock.now=(time) and manually advance time with Clock.tick(seconds).

In any other environment other than test, Clock will behave exactly like Time.

Requirements

To initialize properly, this gem requires Rails 3.0 or above.

About

A simple wrapper for Ruby's Time object to provide some more control in testing

Resources

Stars

Watchers

Forks

Packages

No packages published