module ActiveFixtures::Time::Helper

Public Instance Methods

af_time(name) { || ... } click to toggle source
# File lib/active-fixtures/time.rb, line 5
def af_time(name)
  moment = Time[name].moment

  block_given? ?
    Timecop.freeze(moment){ yield } :
    moment
end