diff options
Diffstat (limited to 'spec/ruby/shared/file')
-rw-r--r-- | spec/ruby/shared/file/executable.rb | 2 | ||||
-rw-r--r-- | spec/ruby/shared/file/readable.rb | 5 | ||||
-rw-r--r-- | spec/ruby/shared/file/writable.rb | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/spec/ruby/shared/file/executable.rb b/spec/ruby/shared/file/executable.rb index 2987d0aabb..7b5c4c580c 100644 --- a/spec/ruby/shared/file/executable.rb +++ b/spec/ruby/shared/file/executable.rb @@ -13,7 +13,7 @@ describe :file_executable, shared: true do rm_r @file1, @file2 end - platform_is_not :windows do + platform_is_not :windows, :android do it "returns true if named file is executable by the effective user id of the process, otherwise false" do @object.send(@method, '/etc/passwd').should == false @object.send(@method, @file1).should == true diff --git a/spec/ruby/shared/file/readable.rb b/spec/ruby/shared/file/readable.rb index 74f58caaff..eb2ca06812 100644 --- a/spec/ruby/shared/file/readable.rb +++ b/spec/ruby/shared/file/readable.rb @@ -4,9 +4,12 @@ describe :file_readable, shared: true do platform_is :windows do @file2 = File.join(ENV["WINDIR"], "system32/drivers/etc/services").tr(File::SEPARATOR, File::ALT_SEPARATOR) end - platform_is_not :windows do + platform_is_not :windows, :android do @file2 = "/etc/passwd" end + platform_is :android do + @file2 = "/system/bin/sh" + end end after :each do diff --git a/spec/ruby/shared/file/writable.rb b/spec/ruby/shared/file/writable.rb index 902d545da1..4bb8aedce6 100644 --- a/spec/ruby/shared/file/writable.rb +++ b/spec/ruby/shared/file/writable.rb @@ -8,7 +8,7 @@ describe :file_writable, shared: true do end it "returns true if named file is writable by the effective user id of the process, otherwise false" do - platform_is_not :windows do + platform_is_not :windows, :android do as_user do @object.send(@method, "/etc/passwd").should == false end |