diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-04-03 09:47:19 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-04-03 09:47:19 +0900 |
commit | ca0f68260ee930100dc39f8c4647ce56663f17fe (patch) | |
tree | 8132b05bc6d7ceeb78a6b6e0e739597f97739a39 /spec/ruby/core/file | |
parent | 18f7d3c9a647f31f11e182d900b88edf5e34ea4b (diff) | |
download | ruby-ca0f68260ee930100dc39f8c4647ce56663f17fe.tar.gz |
Use `platform_is` guard
Diffstat (limited to 'spec/ruby/core/file')
-rw-r--r-- | spec/ruby/core/file/atime_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/file/ctime_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/file/mtime_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/file/utime_spec.rb | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/core/file/atime_spec.rb b/spec/ruby/core/file/atime_spec.rb index b9b5db876c..5663e47266 100644 --- a/spec/ruby/core/file/atime_spec.rb +++ b/spec/ruby/core/file/atime_spec.rb @@ -15,7 +15,7 @@ describe "File.atime" do File.atime(@file).should be_kind_of(Time) end - guard -> { platform_is :linux or platform_is :windows } do + platform_is :linux, :windows do ## NOTE also that some Linux systems disable atime (e.g. via mount params) for better filesystem speed. it "returns the last access time for the named file with microseconds" do supports_subseconds = Integer(`stat -c%x '#{__FILE__}'`[/\.(\d+)/, 1], 10) diff --git a/spec/ruby/core/file/ctime_spec.rb b/spec/ruby/core/file/ctime_spec.rb index fff74b1d40..b16eb13c1e 100644 --- a/spec/ruby/core/file/ctime_spec.rb +++ b/spec/ruby/core/file/ctime_spec.rb @@ -14,7 +14,7 @@ describe "File.ctime" do File.ctime(@file).should be_kind_of(Time) end - guard -> { platform_is :linux or platform_is :windows } do + platform_is :linux, :windows do it "returns the change time for the named file (the time at which directory information about the file was changed, not the file itself) with microseconds." do supports_subseconds = Integer(`stat -c%z '#{__FILE__}'`[/\.(\d+)/, 1], 10) if supports_subseconds != 0 diff --git a/spec/ruby/core/file/mtime_spec.rb b/spec/ruby/core/file/mtime_spec.rb index 02f6fc4637..8d47d3021a 100644 --- a/spec/ruby/core/file/mtime_spec.rb +++ b/spec/ruby/core/file/mtime_spec.rb @@ -15,7 +15,7 @@ describe "File.mtime" do File.mtime(@filename).should be_close(@mtime, TIME_TOLERANCE) end - guard -> { platform_is :linux or platform_is :windows } do + platform_is :linux, :windows do it "returns the modification Time of the file with microseconds" do supports_subseconds = Integer(`stat -c%y '#{__FILE__}'`[/\.(\d+)/, 1], 10) if supports_subseconds != 0 diff --git a/spec/ruby/core/file/utime_spec.rb b/spec/ruby/core/file/utime_spec.rb index d703681115..96627b1fc6 100644 --- a/spec/ruby/core/file/utime_spec.rb +++ b/spec/ruby/core/file/utime_spec.rb @@ -3,7 +3,7 @@ require_relative '../../spec_helper' describe "File.utime" do before :all do - @time_is_float = /mswin|mingw/ =~ RUBY_PLATFORM + @time_is_float = platform_is :windows end before :each do |