aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/file/utime_spec.rb
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2019-04-27 18:53:23 +0200
committerBenoit Daloze <eregontp@gmail.com>2019-04-27 18:53:23 +0200
commita1b4816759418ca8fe510e8739622fc5d77ab0f0 (patch)
tree9d4fb6091d0086817f5bde46bf1150e9130d34fd /spec/ruby/core/file/utime_spec.rb
parent00c33d9c232ed1a79eda17acd7231ac93caa162b (diff)
downloadruby-a1b4816759418ca8fe510e8739622fc5d77ab0f0.tar.gz
Update to ruby/spec@15c9619
Diffstat (limited to 'spec/ruby/core/file/utime_spec.rb')
-rw-r--r--spec/ruby/core/file/utime_spec.rb24
1 files changed, 12 insertions, 12 deletions
diff --git a/spec/ruby/core/file/utime_spec.rb b/spec/ruby/core/file/utime_spec.rb
index 64af82ef19..03adc76efe 100644
--- a/spec/ruby/core/file/utime_spec.rb
+++ b/spec/ruby/core/file/utime_spec.rb
@@ -27,10 +27,10 @@ describe "File.utime" do
File.atime(@file2).should be_close(@atime, 0.0001)
File.mtime(@file2).should be_close(@mtime, 0.0001)
else
- File.atime(@file1).to_i.should be_close(@atime.to_i, 2)
- File.mtime(@file1).to_i.should be_close(@mtime.to_i, 2)
- File.atime(@file2).to_i.should be_close(@atime.to_i, 2)
- File.mtime(@file2).to_i.should be_close(@mtime.to_i, 2)
+ File.atime(@file1).to_i.should be_close(@atime.to_i, TIME_TOLERANCE)
+ File.mtime(@file1).to_i.should be_close(@mtime.to_i, TIME_TOLERANCE)
+ File.atime(@file2).to_i.should be_close(@atime.to_i, TIME_TOLERANCE)
+ File.mtime(@file2).to_i.should be_close(@mtime.to_i, TIME_TOLERANCE)
end
end
@@ -43,10 +43,10 @@ describe "File.utime" do
File.atime(@file2).should be_close(tn, 0.050)
File.mtime(@file2).should be_close(tn, 0.050)
else
- File.atime(@file1).to_i.should be_close(Time.now.to_i, 2)
- File.mtime(@file1).to_i.should be_close(Time.now.to_i, 2)
- File.atime(@file2).to_i.should be_close(Time.now.to_i, 2)
- File.mtime(@file2).to_i.should be_close(Time.now.to_i, 2)
+ File.atime(@file1).to_i.should be_close(Time.now.to_i, TIME_TOLERANCE)
+ File.mtime(@file1).to_i.should be_close(Time.now.to_i, TIME_TOLERANCE)
+ File.atime(@file2).to_i.should be_close(Time.now.to_i, TIME_TOLERANCE)
+ File.mtime(@file2).to_i.should be_close(Time.now.to_i, TIME_TOLERANCE)
end
end
@@ -63,10 +63,10 @@ describe "File.utime" do
File.mtime(@file2).should be_close(@mtime, 0.0001)
else
File.utime(@atime.to_i, @mtime.to_i, @file1, @file2)
- File.atime(@file1).to_i.should be_close(@atime.to_i, 2)
- File.mtime(@file1).to_i.should be_close(@mtime.to_i, 2)
- File.atime(@file2).to_i.should be_close(@atime.to_i, 2)
- File.mtime(@file2).to_i.should be_close(@mtime.to_i, 2)
+ File.atime(@file1).to_i.should be_close(@atime.to_i, TIME_TOLERANCE)
+ File.mtime(@file1).to_i.should be_close(@mtime.to_i, TIME_TOLERANCE)
+ File.atime(@file2).to_i.should be_close(@atime.to_i, TIME_TOLERANCE)
+ File.mtime(@file2).to_i.should be_close(@mtime.to_i, TIME_TOLERANCE)
end
end