spec/spec_helper.rb in rufus-scheduler-3.0.6 vs spec/spec_helper.rb in rufus-scheduler-3.0.7

- old
+ new

@@ -33,9 +33,21 @@ sec = Time.now.sec while Time.now.sec == sec; sleep 0.2; end end +def in_zone(zone_name, &block) + + prev_tz = ENV['TZ'] + ENV['TZ'] = zone_name + + block.call + +ensure + + ENV['TZ'] = prev_tz +end + #require 'rspec/expectations' RSpec::Matchers.define :be_within_1s_of do |expected|