diff options
author | Benoit Daloze <eregontp@gmail.com> | 2021-10-20 21:57:05 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2021-10-20 21:57:05 +0200 |
commit | 030b1892d5cc6f4c14b08d67d4ee60c202edc183 (patch) | |
tree | 8868c9c180b2c24d22ba13e00e6137007a60290f /spec/ruby/core/file | |
parent | 500ba248826fea96c93dbc76199dd331f0a43eb2 (diff) |
Update to ruby/spec@254c380
Diffstat (limited to 'spec/ruby/core/file')
-rw-r--r-- | spec/ruby/core/file/utime_spec.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/spec/ruby/core/file/utime_spec.rb b/spec/ruby/core/file/utime_spec.rb index 45a51490e4..59eef20c66 100644 --- a/spec/ruby/core/file/utime_spec.rb +++ b/spec/ruby/core/file/utime_spec.rb @@ -70,13 +70,11 @@ describe "File.utime" do end end - platform_is_not :windows 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 - end + it "may set nanosecond precision" do + t = Time.utc(2007, 11, 1, 15, 25, 0, 123456.789r) + File.utime(t, t, @file1) + File.atime(@file1).nsec.should.between?(0, 123500000) + File.mtime(@file1).nsec.should.between?(0, 123500000) end platform_is :linux do |