1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

spec/: skip some specs so that no failure occurs in root privilege

Follow up of r61757,  This change makes `sudo make test-spec` pass on my
machine.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2018-01-10 13:30:25 +00:00
parent 5d0103f973
commit 205f0dcf3a
10 changed files with 143 additions and 113 deletions

View file

@ -71,37 +71,39 @@ describe "File#chmod" do
end
platform_is_not :windows do
it "with '0222' makes file writable but not readable or executable" do
@file.chmod(0222)
File.readable?(@filename).should == false
File.writable?(@filename).should == true
File.executable?(@filename).should == false
end
as_user do
it "with '0222' makes file writable but not readable or executable" do
@file.chmod(0222)
File.readable?(@filename).should == false
File.writable?(@filename).should == true
File.executable?(@filename).should == false
end
it "with '0444' makes file readable but not writable or executable" do
@file.chmod(0444)
File.readable?(@filename).should == true
File.writable?(@filename).should == false
File.executable?(@filename).should == false
end
it "with '0444' makes file readable but not writable or executable" do
@file.chmod(0444)
File.readable?(@filename).should == true
File.writable?(@filename).should == false
File.executable?(@filename).should == false
end
it "with '0666' makes file readable and writable but not executable" do
@file.chmod(0666)
File.readable?(@filename).should == true
File.writable?(@filename).should == true
File.executable?(@filename).should == false
end
it "with '0666' makes file readable and writable but not executable" do
@file.chmod(0666)
File.readable?(@filename).should == true
File.writable?(@filename).should == true
File.executable?(@filename).should == false
end
it "with '0111' makes file executable but not readable or writable" do
@file.chmod(0111)
File.readable?(@filename).should == false
File.writable?(@filename).should == false
File.executable?(@filename).should == true
end
it "with '0111' makes file executable but not readable or writable" do
@file.chmod(0111)
File.readable?(@filename).should == false
File.writable?(@filename).should == false
File.executable?(@filename).should == true
end
it "modifies the permission bits of the files specified" do
@file.chmod(0755)
File.stat(@filename).mode.should == 33261
it "modifies the permission bits of the files specified" do
@file.chmod(0755)
File.stat(@filename).mode.should == 33261
end
end
end
end
@ -204,18 +206,20 @@ describe "File.chmod" do
end
platform_is_not :windows do
it "with '0222' makes file writable but not readable or executable" do
File.chmod(0222, @file)
File.readable?(@file).should == false
File.writable?(@file).should == true
File.executable?(@file).should == false
end
as_user do
it "with '0222' makes file writable but not readable or executable" do
File.chmod(0222, @file)
File.readable?(@file).should == false
File.writable?(@file).should == true
File.executable?(@file).should == false
end
it "with '0444' makes file readable but not writable or executable" do
File.chmod(0444, @file)
File.readable?(@file).should == true
File.writable?(@file).should == false
File.executable?(@file).should == false
it "with '0444' makes file readable but not writable or executable" do
File.chmod(0444, @file)
File.readable?(@file).should == true
File.writable?(@file).should == false
File.executable?(@file).should == false
end
end
it "with '0666' makes file readable and writable but not executable" do
@ -225,11 +229,13 @@ describe "File.chmod" do
File.executable?(@file).should == false
end
it "with '0111' makes file executable but not readable or writable" do
File.chmod(0111, @file)
File.readable?(@file).should == false
File.writable?(@file).should == false
File.executable?(@file).should == true
as_user do
it "with '0111' makes file executable but not readable or writable" do
File.chmod(0111, @file)
File.readable?(@file).should == false
File.writable?(@file).should == false
File.executable?(@file).should == true
end
end
it "modifies the permission bits of the files specified" do