Sha256: f431143921f413745c5a2fcb5d56097a0d455be461ccdc070eb6a1ea8f73971b
Contents?: true
Size: 326 Bytes
Versions: 46
Compression:
Stored size: 326 Bytes
Contents
class Time class << self module NowWithFixedTime def now if @fixed_time @fixed_time.dup else super end end end prepend NowWithFixedTime def fix(time = Time.now) @fixed_time = time yield ensure @fixed_time = nil end end end
Version data entries
46 entries across 46 versions & 1 rubygems