Sha256: 7cdba6729f79d99b8fd9de9e9177c0cc256816a7e019c6bbb8d94e6665f3bc45
Contents?: true
Size: 484 Bytes
Versions: 17
Compression:
Stored size: 484 Bytes
Contents
class ProgressBar class Time def self.now(time = ::Time) @@time = time @@time.send unmocked_time_method end private def self.unmocked_time_method time_mocking_library_methods.find { |method| @@time.respond_to? method } end def self.time_mocking_library_methods [ :now_without_mock_time, # Timecop :now_without_delorean, # Delorean :now # Actual ] end end end
Version data entries
17 entries across 17 versions & 3 rubygems