Fix filesystem dependent tests

Ruby cannot guarantee the resolutions of underlying filesystems.
This commit is contained in:
Nobuyoshi Nakada 2021-10-06 11:38:47 +09:00
parent abd473928e
commit ddca0c6686
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -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