spec/timeliness/parser_spec.rb in timeliness-0.4.4 vs spec/timeliness/parser_spec.rb in timeliness-0.4.5

- old
+ new

@@ -4,11 +4,11 @@ Time.zone = zone if zone Timeliness.configuration.default_timezone = output if output end end - around(:all) do |example| + around do |example| current_zone = Time.zone example.call Time.zone = current_zone end @@ -102,16 +102,16 @@ timezone_settings zone: 'America/Phoenix', output: :current it 'should return value shifted by positive offset in default timezone' do value = parse("2000-06-01T12:00:00+02:00") expect(value).to eq Time.zone.local(2000,6,1,3,0,0) - expect(value.utc_offset).to eq -7.hours + expect(value.utc_offset).to eq(-7.hours) end it 'should return value shifted by negative offset in default timezone' do value = parse("2000-06-01T12:00:00-01:00") expect(value).to eq Time.zone.local(2000,6,1,6,0,0) - expect(value.utc_offset).to eq -7.hours + expect(value.utc_offset).to eq(-7.hours) end end end context "string with zone abbreviation" do