Timecop
Constants
VERSION = "0.1.2"
Instance methods
freeze(time : Time)
Allows you to run a block of code and "fake" a time throughout the execution of that block.
freeze(time : Time, &block : Time -> )
Allows you to run a block of code and "fake" a time throughout the execution of that block.
safe_mode=(safe)
Sourcesafe_mode?
Sourcescale(time : Time, factor : Float64)
Allows you to run a block of code and "scale" a time throughout the execution of that block. The first argument is a scaling factor, for example: Timecop.scale(2) do ... time will 'go' twice as fast here end Returns the value of the block if one is given, or the mocked time.
scale(time : Time, factor : Float64, &block : Time -> )
Sourcetravel(time : Time)
Allows you to run a block of code and "fake" a time throughout the execution of that block.
travel(time : Time, &block : Time -> )
Source