Created
September 8, 2012 05:51
-
-
Save HotFusionMan/3672210 to your computer and use it in GitHub Desktop.
Use Clock wherever you would use Time. Edit as needed for testing purposes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use Clock wherever you would use Time. Edit as needed for testing purposes. N.B. Remember that .now is a class method!!! | |
class Clock < Time | |
#def self.now | |
#super #.advance( :days => -1, :seconds => -1 ) # #advance is available in a Rails or ActiveSupport environment | |
#end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment