aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/file
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-15 17:44:37 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-15 17:44:37 +0000
commit30ed82e7724093bb3c2015a818c28c3592134bba (patch)
tree5445b9e26d9ee173fa3735007f3e2b42791d2ec5 /spec/ruby/core/file
parentf941bdf263dcc16ea4e6b4576341882b89567c0b (diff)
downloadruby-30ed82e7724093bb3c2015a818c28c3592134bba.tar.gz
Update to ruby/spec@595645f
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/core/file')
-rw-r--r--spec/ruby/core/file/chown_spec.rb16
-rw-r--r--spec/ruby/core/file/shared/read.rb4
-rw-r--r--spec/ruby/core/file/stat/inspect_spec.rb2
3 files changed, 11 insertions, 11 deletions
diff --git a/spec/ruby/core/file/chown_spec.rb b/spec/ruby/core/file/chown_spec.rb
index a0b46e9e39..6266e12bfd 100644
--- a/spec/ruby/core/file/chown_spec.rb
+++ b/spec/ruby/core/file/chown_spec.rb
@@ -91,17 +91,17 @@ describe "File#chown" do
as_superuser do
platform_is :windows do
it "does not modify the owner id of the file" do
- File.chown 0, nil, @fname
- File.stat(@fname).uid.should == 0
- File.chown 501, nil, @fname
- File.stat(@fname).uid.should == 0
+ @file.chown 0, nil
+ @file.stat.uid.should == 0
+ @file.chown 501, nil
+ @file.stat.uid.should == 0
end
it "does not modify the group id of the file" do
- File.chown nil, 0, @fname
- File.stat(@fname).gid.should == 0
- File.chown nil, 501, @fname
- File.stat(@fname).gid.should == 0
+ @file.chown nil, 0
+ @file.stat.gid.should == 0
+ @file.chown nil, 501
+ @file.stat.gid.should == 0
end
end
diff --git a/spec/ruby/core/file/shared/read.rb b/spec/ruby/core/file/shared/read.rb
index 916a6222bf..e37523c244 100644
--- a/spec/ruby/core/file/shared/read.rb
+++ b/spec/ruby/core/file/shared/read.rb
@@ -1,13 +1,13 @@
require File.expand_path('../../../dir/fixtures/common', __FILE__)
describe :file_read_directory, shared: true do
- platform_is :darwin, :linux, :windows do
+ platform_is :darwin, :linux, :openbsd, :windows do
it "raises an Errno::EISDIR when passed a path that is a directory" do
lambda { @object.send(@method, ".") }.should raise_error(Errno::EISDIR)
end
end
- platform_is :bsd do
+ platform_is :freebsd, :netbsd do
it "does not raises any exception when passed a path that is a directory" do
lambda { @object.send(@method, ".") }.should_not raise_error
end
diff --git a/spec/ruby/core/file/stat/inspect_spec.rb b/spec/ruby/core/file/stat/inspect_spec.rb
index dd2ad21da3..ec99ab16a8 100644
--- a/spec/ruby/core/file/stat/inspect_spec.rb
+++ b/spec/ruby/core/file/stat/inspect_spec.rb
@@ -16,7 +16,7 @@ describe "File::Stat#inspect" do
expected = "#<File::Stat dev=0x#{st.dev.to_s(16)}, ino=#{st.ino}, mode=#{sprintf("%07o", st.mode)}, nlink=#{st.nlink}"
expected << ", uid=#{st.uid}, gid=#{st.gid}, rdev=0x#{st.rdev.to_s(16)}, size=#{st.size}, blksize=#{st.blksize.inspect}"
expected << ", blocks=#{st.blocks.inspect}, atime=#{st.atime}, mtime=#{st.mtime}, ctime=#{st.ctime}"
- platform_is :bsd, :darwin do
+ platform_is :netbsd, :freebsd, :darwin do
# Windows has File.birthtime but it's not here since already shown by ctime.
expected << ", birthtime=#{st.birthtime}"
end