diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-10-06 11:38:47 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-10-06 11:41:03 +0900 |
commit | ddca0c66867b09106a835f28600edefac7e785ce (patch) | |
tree | 93e48a0675d410a934a95064f7385c72fe2dd0a5 | |
parent | abd473928ec54e2ee990d178e42f2f544f21b041 (diff) |
Fix filesystem dependent tests
Ruby cannot guarantee the resolutions of underlying filesystems.
-rw-r--r-- | spec/ruby/core/file/utime_spec.rb | 4 |
1 files 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 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 |