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.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/ruby/core/file/link_spec.rb b/spec/ruby/core/file/link_spec.rb
index 4e186c6076..11d4c8d25b 100644
--- a/spec/ruby/core/file/link_spec.rb
+++ b/spec/ruby/core/file/link_spec.rb
@@ -22,18 +22,18 @@ describe "File.link" do
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_error(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_error(ArgumentError)
+ -> { File.link(@file) }.should raise_error(ArgumentError)
+ -> { File.link(@file, @link, @file) }.should raise_error(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_error(TypeError)
+ -> { File.link(@file, 1) }.should raise_error(TypeError)
end
end
end