summaryrefslogtreecommitdiff
path: root/spec/ruby/core/file/expand_path_spec.rb
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2019-07-27 12:40:09 +0200
committerBenoit Daloze <eregontp@gmail.com>2019-07-27 12:40:09 +0200
commit5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0 (patch)
tree05b5c68c8b2a00224d4646ea3b26ce3877efaadd /spec/ruby/core/file/expand_path_spec.rb
parenta06301b103371b0b7da8eaca26ba744961769f99 (diff)
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/core/file/expand_path_spec.rb')
-rw-r--r--spec/ruby/core/file/expand_path_spec.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/ruby/core/file/expand_path_spec.rb b/spec/ruby/core/file/expand_path_spec.rb
index aa6a3c9c63..88078645ab 100644
--- a/spec/ruby/core/file/expand_path_spec.rb
+++ b/spec/ruby/core/file/expand_path_spec.rb
@@ -92,7 +92,7 @@ describe "File.expand_path" do
end
it "raises an ArgumentError if the path is not valid" do
- lambda { File.expand_path("~a_not_existing_user") }.should raise_error(ArgumentError)
+ -> { File.expand_path("~a_not_existing_user") }.should raise_error(ArgumentError)
end
it "expands ~ENV['USER'] to the user's home directory" do
@@ -117,9 +117,9 @@ describe "File.expand_path" do
end
it "raises a TypeError if not passed a String type" do
- lambda { File.expand_path(1) }.should raise_error(TypeError)
- lambda { File.expand_path(nil) }.should raise_error(TypeError)
- lambda { File.expand_path(true) }.should raise_error(TypeError)
+ -> { File.expand_path(1) }.should raise_error(TypeError)
+ -> { File.expand_path(nil) }.should raise_error(TypeError)
+ -> { File.expand_path(true) }.should raise_error(TypeError)
end
platform_is_not :windows do
@@ -159,7 +159,7 @@ describe "File.expand_path" do
platform_is_not :windows do
it "raises an Encoding::CompatibilityError if the external encoding is not compatible" do
Encoding.default_external = Encoding::UTF_16BE
- lambda { File.expand_path("./a") }.should raise_error(Encoding::CompatibilityError)
+ -> { File.expand_path("./a") }.should raise_error(Encoding::CompatibilityError)
end
end
@@ -244,7 +244,7 @@ platform_is_not :windows do
it "raises an ArgumentError when passed '~' if HOME == ''" do
ENV["HOME"] = ""
- lambda { File.expand_path("~") }.should raise_error(ArgumentError)
+ -> { File.expand_path("~") }.should raise_error(ArgumentError)
end
end
@@ -259,7 +259,7 @@ platform_is_not :windows do
it "raises an ArgumentError" do
ENV["HOME"] = "non-absolute"
- lambda { File.expand_path("~") }.should raise_error(ArgumentError, 'non-absolute home')
+ -> { File.expand_path("~") }.should raise_error(ArgumentError, 'non-absolute home')
end
end
end