ruby-changes:68279
From: Nobuyoshi <ko1@a...>
Date: Wed, 6 Oct 2021 11:42:42 +0900 (JST)
Subject: [ruby-changes:68279] ddca0c6686 (master): Fix filesystem dependent tests
https://git.ruby-lang.org/ruby.git/commit/?id=ddca0c6686 From ddca0c66867b09106a835f28600edefac7e785ce Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Wed, 6 Oct 2021 11:38:47 +0900 Subject: Fix filesystem dependent tests Ruby cannot guarantee the resolutions of underlying filesystems. --- spec/ruby/core/file/utime_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/ruby/core/file/utime_spec.rb b/spec/ruby/core/file/utime_spec.rb index 45a51490e4..dd8eeef489 100644 --- a/spec/ruby/core/file/utime_spec.rb +++ b/spec/ruby/core/file/utime_spec.rb @@ -74,8 +74,8 @@ describe "File.utime" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/file/utime_spec.rb#L74 it "sets nanosecond precision" do t = Time.utc(2007, 11, 1, 15, 25, 0, 123456.789r) File.utime(t, t, @file1) - File.atime(@file1).nsec.should == 123456789 - File.mtime(@file1).nsec.should == 123456789 + File.atime(@file1).nsec.should.between?(0, 123500000) + File.mtime(@file1).nsec.should.between?(0, 123500000) end end -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/