diff options
Diffstat (limited to 'spec/ruby/library/pathname')
-rw-r--r-- | spec/ruby/library/pathname/new_spec.rb | 10 | ||||
-rw-r--r-- | spec/ruby/library/pathname/relative_path_from_spec.rb | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/spec/ruby/library/pathname/new_spec.rb b/spec/ruby/library/pathname/new_spec.rb index 4f519af398..f400444887 100644 --- a/spec/ruby/library/pathname/new_spec.rb +++ b/spec/ruby/library/pathname/new_spec.rb @@ -7,7 +7,7 @@ describe "Pathname.new" do end it "raises an ArgumentError when called with \0" do - lambda { Pathname.new("\0")}.should raise_error(ArgumentError) + -> { Pathname.new("\0")}.should raise_error(ArgumentError) end it "is tainted if path is tainted" do @@ -16,10 +16,10 @@ describe "Pathname.new" do end it "raises a TypeError if not passed a String type" do - lambda { Pathname.new(nil) }.should raise_error(TypeError) - lambda { Pathname.new(0) }.should raise_error(TypeError) - lambda { Pathname.new(true) }.should raise_error(TypeError) - lambda { Pathname.new(false) }.should raise_error(TypeError) + -> { Pathname.new(nil) }.should raise_error(TypeError) + -> { Pathname.new(0) }.should raise_error(TypeError) + -> { Pathname.new(true) }.should raise_error(TypeError) + -> { Pathname.new(false) }.should raise_error(TypeError) end it "initializes with an object with to_path" do diff --git a/spec/ruby/library/pathname/relative_path_from_spec.rb b/spec/ruby/library/pathname/relative_path_from_spec.rb index 1a941be926..abe9c80a45 100644 --- a/spec/ruby/library/pathname/relative_path_from_spec.rb +++ b/spec/ruby/library/pathname/relative_path_from_spec.rb @@ -7,11 +7,11 @@ describe "Pathname#relative_path_from" do end it "raises an error when the two paths do not share a common prefix" do - lambda { relative_path_str('/usr', 'foo') }.should raise_error(ArgumentError) + -> { relative_path_str('/usr', 'foo') }.should raise_error(ArgumentError) end it "raises an error when the base directory has .." do - lambda { relative_path_str('a', '..') }.should raise_error(ArgumentError) + -> { relative_path_str('a', '..') }.should raise_error(ArgumentError) end it "returns a path relative from root" do |