summaryrefslogtreecommitdiff
path: root/spec/ruby/core/file/link_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/file/link_spec.rb')
-rw-r--r--spec/ruby/core/file/link_spec.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/ruby/core/file/link_spec.rb b/spec/ruby/core/file/link_spec.rb
index 69d1459672..768ee4b0fa 100644
--- a/spec/ruby/core/file/link_spec.rb
+++ b/spec/ruby/core/file/link_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "File.link" do
before :each do
@@ -13,27 +13,27 @@ describe "File.link" do
rm_r @link, @file
end
- platform_is_not :windows do
+ platform_is_not :windows, :android do
it "link a file with another" do
File.link(@file, @link).should == 0
- File.exist?(@link).should == true
+ File.should.exist?(@link)
File.identical?(@file, @link).should == true
end
it "raises an Errno::EEXIST if the target already exists" do
File.link(@file, @link)
- lambda { File.link(@file, @link) }.should raise_error(Errno::EEXIST)
+ -> { File.link(@file, @link) }.should.raise(Errno::EEXIST)
end
it "raises an ArgumentError if not passed two arguments" do
- lambda { File.link }.should raise_error(ArgumentError)
- lambda { File.link(@file) }.should raise_error(ArgumentError)
- lambda { File.link(@file, @link, @file) }.should raise_error(ArgumentError)
+ -> { File.link }.should.raise(ArgumentError)
+ -> { File.link(@file) }.should.raise(ArgumentError)
+ -> { File.link(@file, @link, @file) }.should.raise(ArgumentError)
end
it "raises a TypeError if not passed String types" do
- lambda { File.link(@file, nil) }.should raise_error(TypeError)
- lambda { File.link(@file, 1) }.should raise_error(TypeError)
+ -> { File.link(@file, nil) }.should.raise(TypeError)
+ -> { File.link(@file, 1) }.should.raise(TypeError)
end
end
end