Module: RSpecPower::TimeHelpers

Defined in:
lib/rspec_power/time.rb

Instance Method Summary collapse

Instance Method Details

#with_time_zone(zone) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/rspec_power/time.rb', line 5

def with_time_zone(zone)
  if defined?(ActiveSupport::TimeZone)
    ::Time.use_zone(zone) { yield }
  else
    yield
  end
end