diff options
Diffstat (limited to 'spec/ruby/core/dir/chroot_spec.rb')
| -rw-r--r-- | spec/ruby/core/dir/chroot_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/ruby/core/dir/chroot_spec.rb b/spec/ruby/core/dir/chroot_spec.rb index 1afe254957..79ad9759b0 100644 --- a/spec/ruby/core/dir/chroot_spec.rb +++ b/spec/ruby/core/dir/chroot_spec.rb @@ -1,6 +1,6 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../fixtures/common', __FILE__) -require File.expand_path('../shared/chroot', __FILE__) +require_relative '../../spec_helper' +require_relative 'fixtures/common' +require_relative 'shared/chroot' platform_is_not :windows do as_superuser do @@ -9,7 +9,7 @@ platform_is_not :windows do end end - platform_is_not :cygwin do + platform_is_not :cygwin, :android do as_user do describe "Dir.chroot as regular user" do before :all do @@ -21,17 +21,17 @@ platform_is_not :windows do end it "raises an Errno::EPERM exception if the directory exists" do - lambda { Dir.chroot('.') }.should raise_error(Errno::EPERM) + -> { Dir.chroot('.') }.should.raise(Errno::EPERM) end it "raises a SystemCallError if the directory doesn't exist" do - lambda { Dir.chroot('xgwhwhsjai2222jg') }.should raise_error(SystemCallError) + -> { Dir.chroot('xgwhwhsjai2222jg') }.should.raise(SystemCallError) end it "calls #to_path on non-String argument" do p = mock('path') p.should_receive(:to_path).and_return('.') - lambda { Dir.chroot(p) }.should raise_error + -> { Dir.chroot(p) }.should.raise(Errno::EPERM) end end end |
