summaryrefslogtreecommitdiff
path: root/spec/ruby/core/file/stat/owned_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/file/stat/owned_spec.rb')
-rw-r--r--spec/ruby/core/file/stat/owned_spec.rb20
1 files changed, 11 insertions, 9 deletions
diff --git a/spec/ruby/core/file/stat/owned_spec.rb b/spec/ruby/core/file/stat/owned_spec.rb
index 4c4d843bbe..a23ad850c5 100644
--- a/spec/ruby/core/file/stat/owned_spec.rb
+++ b/spec/ruby/core/file/stat/owned_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/owned', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative '../../../spec_helper'
+require_relative '../../../shared/file/owned'
+require_relative 'fixtures/classes'
describe "File::Stat#owned?" do
it_behaves_like :file_owned, :owned?, FileStat
@@ -18,14 +18,16 @@ describe "File::Stat#owned?" do
it "returns true if the file is owned by the user" do
st = File.stat(@file)
- st.owned?.should == true
+ st.should.owned?
end
- platform_is_not :windows do
- it "returns false if the file is not owned by the user" do
- system_file = '/etc/passwd'
- st = File.stat(system_file)
- st.owned?.should == false
+ platform_is_not :windows, :android do
+ as_user do
+ it "returns false if the file is not owned by the user" do
+ system_file = '/etc/passwd'
+ st = File.stat(system_file)
+ st.should_not.owned?
+ end
end
end
end