Skip to content

Commit a9bb95e

Browse files
committed
[GR-45010] Fix Time.new(in: zone) spec to avoid transient failures
PullRequest: truffleruby/3712
2 parents faaa4c3 + 18c47ab commit a9bb95e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/ruby/core/time/new_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ def zone.local_to_utc(t)
456456
Time.new(2000, 1, 1, in: "+05:00").should == Time.new(2000, 1, 1, 0, 0, 0, "+05:00")
457457
Time.new(2000, 1, in: "+05:00").should == Time.new(2000, 1, 1, 0, 0, 0, "+05:00")
458458
Time.new(2000, in: "+05:00").should == Time.new(2000, 1, 1, 0, 0, 0, "+05:00")
459-
Time.new(in: "+05:00").round(0).should == Time.now.getlocal("+05:00").round(0)
459+
Time.new(in: "+05:00").should be_close(Time.now.getlocal("+05:00"), TIME_TOLERANCE)
460460
end
461461

462462
it "converts to a provided timezone if all the positional arguments are omitted" do

0 commit comments

Comments
 (0)