aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/file/owned_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/file/owned_spec.rb')
-rw-r--r--spec/ruby/core/file/owned_spec.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/ruby/core/file/owned_spec.rb b/spec/ruby/core/file/owned_spec.rb
index d19e9cb278..c2d8a74b49 100644
--- a/spec/ruby/core/file/owned_spec.rb
+++ b/spec/ruby/core/file/owned_spec.rb
@@ -24,9 +24,11 @@ describe "File.owned?" do
end
platform_is_not :windows do
- it "returns false when the file is not owned by the user" do
- system_file = '/etc/passwd'
- File.owned?(system_file).should == false
+ as_user do
+ it "returns false when the file is not owned by the user" do
+ system_file = '/etc/passwd'
+ File.owned?(system_file).should == false
+ end
end
end