Sha256: e15603cfef621894708c34a525131c15f2be56c4e8470ec932313198d348d2ee

Contents?: true

Size: 180 Bytes

Versions: 33

Compression:

Stored size: 180 Bytes

Contents

require 'time_travel/time_extensions'

Time.send(:include, TimeTravel::TimeExtensions)

def at_time(time)
  Time.now = time
  begin
    yield
  ensure
    Time.now = nil
  end
end

Version data entries

33 entries across 33 versions & 4 rubygems

Version Path
adzap-validates_timeliness-1.1.1 spec/time_travel/time_travel.rb
adzap-validates_timeliness-1.1.2 spec/time_travel/time_travel.rb
adzap-validates_timeliness-1.1.3 spec/time_travel/time_travel.rb
adzap-validates_timeliness-1.1.4 spec/time_travel/time_travel.rb
adzap-validates_timeliness-1.1.5 spec/time_travel/time_travel.rb
adzap-validates_timeliness-1.1.6 spec/time_travel/time_travel.rb
adzap-validates_timeliness-1.1.7 spec/time_travel/time_travel.rb
adzap-validates_timeliness-2.0.0 spec/time_travel/time_travel.rb
adzap-validates_timeliness-2.1.0 spec/time_travel/time_travel.rb
adzap-validates_timeliness-2.2.0 spec/time_travel/time_travel.rb
adzap-validates_timeliness-2.2.1 spec/time_travel/time_travel.rb
adzap-validates_timeliness-2.2.2 spec/time_travel/time_travel.rb
markos_validates_timeliness-2.3.2.2 spec/time_travel/time_travel.rb
markos_validates_timeliness-2.3.2.1 spec/time_travel/time_travel.rb
markos_validates_timeliness-2.3.2 spec/time_travel/time_travel.rb
validates_timeliness-2.3.2 spec/time_travel/time_travel.rb
szilm-validates_timeliness-2.3.1 spec/time_travel/time_travel.rb
validates_timeliness-2.3.1 spec/time_travel/time_travel.rb
validates_timeliness-2.3.0 spec/time_travel/time_travel.rb
validates_timeliness-2.2.2 spec/time_travel/time_travel.rb