aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/shared
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-10 13:30:25 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-10 13:30:25 +0000
commit205f0dcf3aafffc1f7a26628845bf6e1b71441da (patch)
tree8a045cddde19a309a4b2c149e320bf9dc00a0cd6 /spec/ruby/shared
parent5d0103f9731f54285fe716137697cea7c0cfd3ab (diff)
downloadruby-205f0dcf3aafffc1f7a26628845bf6e1b71441da.tar.gz
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
Diffstat (limited to 'spec/ruby/shared')
-rw-r--r--spec/ruby/shared/file/writable.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/ruby/shared/file/writable.rb b/spec/ruby/shared/file/writable.rb
index e8296928f3..902d545da1 100644
--- a/spec/ruby/shared/file/writable.rb
+++ b/spec/ruby/shared/file/writable.rb
@@ -9,7 +9,9 @@ describe :file_writable, shared: true do
it "returns true if named file is writable by the effective user id of the process, otherwise false" do
platform_is_not :windows do
- @object.send(@method, "/etc/passwd").should == false
+ as_user do
+ @object.send(@method, "/etc/passwd").should == false
+ end
end
File.open(@file,'w') { @object.send(@method, @file).should == true }
end