update gems; robustify usage of raise_error rspec matcher
This commit is contained in:
parent
80b2f7b63c
commit
6cf70753f4
45
Gemfile.lock
45
Gemfile.lock
@ -8,30 +8,30 @@ GEM
|
|||||||
specs:
|
specs:
|
||||||
diff-lcs (1.2.5)
|
diff-lcs (1.2.5)
|
||||||
docile (1.1.5)
|
docile (1.1.5)
|
||||||
json (1.8.1)
|
json (1.8.3)
|
||||||
multi_json (1.10.1)
|
rake (10.4.2)
|
||||||
rake (10.3.2)
|
rdoc (4.2.2)
|
||||||
rdoc (4.1.1)
|
|
||||||
json (~> 1.4)
|
json (~> 1.4)
|
||||||
redcarpet (3.1.2)
|
redcarpet (3.3.4)
|
||||||
rspec (3.0.0)
|
rspec (3.4.0)
|
||||||
rspec-core (~> 3.0.0)
|
rspec-core (~> 3.4.0)
|
||||||
rspec-expectations (~> 3.0.0)
|
rspec-expectations (~> 3.4.0)
|
||||||
rspec-mocks (~> 3.0.0)
|
rspec-mocks (~> 3.4.0)
|
||||||
rspec-core (3.0.2)
|
rspec-core (3.4.4)
|
||||||
rspec-support (~> 3.0.0)
|
rspec-support (~> 3.4.0)
|
||||||
rspec-expectations (3.0.2)
|
rspec-expectations (3.4.0)
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.0.0)
|
rspec-support (~> 3.4.0)
|
||||||
rspec-mocks (3.0.2)
|
rspec-mocks (3.4.1)
|
||||||
rspec-support (~> 3.0.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (3.0.2)
|
rspec-support (~> 3.4.0)
|
||||||
simplecov (0.8.2)
|
rspec-support (3.4.1)
|
||||||
|
simplecov (0.11.2)
|
||||||
docile (~> 1.1.0)
|
docile (~> 1.1.0)
|
||||||
multi_json
|
json (~> 1.8)
|
||||||
simplecov-html (~> 0.8.0)
|
simplecov-html (~> 0.10.0)
|
||||||
simplecov-html (0.8.0)
|
simplecov-html (0.10.0)
|
||||||
yard (0.8.7.4)
|
yard (0.8.7.6)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
@ -44,3 +44,6 @@ DEPENDENCIES
|
|||||||
simplecov
|
simplecov
|
||||||
yard
|
yard
|
||||||
yawpa!
|
yawpa!
|
||||||
|
|
||||||
|
BUNDLED WITH
|
||||||
|
1.10.6
|
||||||
|
@ -11,7 +11,7 @@ describe Yawpa do
|
|||||||
it "raises an exception when an invalid option is passed" do
|
it "raises an exception when an invalid option is passed" do
|
||||||
options = { }
|
options = { }
|
||||||
params = ['one', '--option', 'two']
|
params = ['one', '--option', 'two']
|
||||||
expect { Yawpa.parse(params, options) }.to raise_error
|
expect { Yawpa.parse(params, options) }.to raise_error(Yawpa::ArgumentParsingException, /Unknown option/)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns boolean options which are set" do
|
it "returns boolean options which are set" do
|
||||||
@ -53,7 +53,7 @@ describe Yawpa do
|
|||||||
opt: {nargs: 2},
|
opt: {nargs: 2},
|
||||||
}
|
}
|
||||||
params = ['--opt', 'val']
|
params = ['--opt', 'val']
|
||||||
expect { Yawpa.parse(params, options) }.to raise_error
|
expect { Yawpa.parse(params, options) }.to raise_error(Yawpa::ArgumentParsingException, /Not enough arguments supplied/)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "uses --opt=val syntax for an option's value" do
|
it "uses --opt=val syntax for an option's value" do
|
||||||
@ -179,7 +179,7 @@ describe Yawpa do
|
|||||||
a: {short: 'a'},
|
a: {short: 'a'},
|
||||||
}
|
}
|
||||||
params = ['-ab']
|
params = ['-ab']
|
||||||
expect { Yawpa.parse(params, options) }.to raise_error
|
expect { Yawpa.parse(params, options) }.to raise_error(Yawpa::ArgumentParsingException, /Unknown option/)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "raises an error when not enough arguments are given to short option" do
|
it "raises an error when not enough arguments are given to short option" do
|
||||||
@ -187,7 +187,7 @@ describe Yawpa do
|
|||||||
a: {nargs: 1, short: 'a'},
|
a: {nargs: 1, short: 'a'},
|
||||||
}
|
}
|
||||||
params = ['-a']
|
params = ['-a']
|
||||||
expect { Yawpa.parse(params, options) }.to raise_error
|
expect { Yawpa.parse(params, options) }.to raise_error(Yawpa::ArgumentParsingException, /Not enough arguments supplied/)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "overwrites option value when short option used after long" do
|
it "overwrites option value when short option used after long" do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user