summaryrefslogtreecommitdiff
path: root/spec/ruby/library/getoptlong/set_options_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/library/getoptlong/set_options_spec.rb
parenta06301b103371b0b7da8eaca26ba744961769f99 (diff)
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/library/getoptlong/set_options_spec.rb')
-rw-r--r--spec/ruby/library/getoptlong/set_options_spec.rb14
1 files changed, 7 insertions, 7 deletions
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