test/test_helper.rb
# makes time "stand still" during execution of a block. if no time is
# supplied, the current time is used. While in the block, Time.new and
# Time.now will always return the "frozen" value.
makes time "stand still" during execution of a block. if no time is
supplied, the current time is used. While in the block, Time.new and
Time.now will always return the "frozen" value.
makes time " stand still " during execution of a block . if no time is supplied the current time is used . While in the block Time . new and Time . now will always return the " frozen " value .
def freeze(time = nil)
        raise "A block is required" unless block_given?
        begin
          prev = @time
          @time = time || now
          yield
        ensure
          @time = prev
        end
      end
def freeze ( time = nil ) raise "A block is required" unless block_given? begin prev = @time @time = time || now yield ensure @time = prev end end
makes time "stand still" during execution of a block.
makes time " stand still " during execution of a block .
time
<not_specific>