summaryrefslogtreecommitdiff
path: root/spec/ruby/library/getoptlong/set_options_spec.rb
diff options
context:
space:
mode:
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