mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@875a09e
This commit is contained in:
parent
a06301b103
commit
5c276e1cc9
1247 changed files with 5316 additions and 5028 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue