summaryrefslogtreecommitdiff
path: root/spec/ruby/library/getoptlong
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/library/getoptlong
parenta06301b103371b0b7da8eaca26ba744961769f99 (diff)
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/library/getoptlong')
-rw-r--r--spec/ruby/library/getoptlong/ordering_spec.rb4
-rw-r--r--spec/ruby/library/getoptlong/set_options_spec.rb14
-rw-r--r--spec/ruby/library/getoptlong/shared/get.rb2
3 files changed, 10 insertions, 10 deletions
diff --git a/spec/ruby/library/getoptlong/ordering_spec.rb b/spec/ruby/library/getoptlong/ordering_spec.rb
index e6b645018d..695d1cafa7 100644
--- a/spec/ruby/library/getoptlong/ordering_spec.rb
+++ b/spec/ruby/library/getoptlong/ordering_spec.rb
@@ -9,7 +9,7 @@ describe "GetoptLong#ordering=" do
opts.quiet = true
opts.get
- lambda {
+ -> {
opts.ordering = GetoptLong::PERMUTE
}.should raise_error(ArgumentError)
end
@@ -18,7 +18,7 @@ describe "GetoptLong#ordering=" do
it "raises an ArgumentError if given an invalid value" do
opts = GetoptLong.new
- lambda {
+ -> {
opts.ordering = 12345
}.should raise_error(ArgumentError)
end
diff --git a/spec/ruby/library/getoptlong/set_options_spec.rb b/spec/ruby/library/getoptlong/set_options_spec.rb
index f2acccea28..36b9c579c4 100644
--- a/spec/ruby/library/getoptlong/set_options_spec.rb
+++ b/spec/ruby/library/getoptlong/set_options_spec.rb
@@ -39,7 +39,7 @@ describe "GetoptLong#set_options" do
it "raises an ArgumentError if too many argument flags where given" do
argv [] do
- lambda {
+ -> {
@opts.set_options(["--size", GetoptLong::NO_ARGUMENT, GetoptLong::REQUIRED_ARGUMENT])
}.should raise_error(ArgumentError)
end
@@ -48,7 +48,7 @@ describe "GetoptLong#set_options" do
it "raises a RuntimeError if processing has already started" do
argv [] do
@opts.get
- lambda {
+ -> {
@opts.set_options()
}.should raise_error(RuntimeError)
end
@@ -56,7 +56,7 @@ describe "GetoptLong#set_options" do
it "raises an ArgumentError if no argument flag was given" do
argv [] do
- lambda {
+ -> {
@opts.set_options(["--size"])
}.should raise_error(ArgumentError)
end
@@ -64,7 +64,7 @@ describe "GetoptLong#set_options" do
it "raises an ArgumentError if one of the given arguments is not an Array" do
argv [] do
- lambda {
+ -> {
@opts.set_options(
["--size", GetoptLong::REQUIRED_ARGUMENT],
"test")
@@ -74,13 +74,13 @@ describe "GetoptLong#set_options" do
it "raises an ArgumentError if the same option is given twice" do
argv [] do
- lambda {
+ -> {
@opts.set_options(
["--size", GetoptLong::NO_ARGUMENT],
["--size", GetoptLong::OPTIONAL_ARGUMENT])
}.should raise_error(ArgumentError)
- lambda {
+ -> {
@opts.set_options(
["--size", GetoptLong::NO_ARGUMENT],
["-s", "--size", GetoptLong::OPTIONAL_ARGUMENT])
@@ -90,7 +90,7 @@ describe "GetoptLong#set_options" do
it "raises an ArgumentError if the given option is invalid" do
argv [] do
- lambda {
+ -> {
@opts.set_options(["-size", GetoptLong::NO_ARGUMENT])
}.should raise_error(ArgumentError)
end
diff --git a/spec/ruby/library/getoptlong/shared/get.rb b/spec/ruby/library/getoptlong/shared/get.rb
index 91a0fbaacc..772a7f6773 100644
--- a/spec/ruby/library/getoptlong/shared/get.rb
+++ b/spec/ruby/library/getoptlong/shared/get.rb
@@ -49,7 +49,7 @@ describe :getoptlong_get, shared: true do
it "raises a if an argument was required, but none given" do
argv [ "--size" ] do
- lambda { @opts.send(@method) }.should raise_error(GetoptLong::MissingArgument)
+ -> { @opts.send(@method) }.should raise_error(GetoptLong::MissingArgument)
end
end