Spec cleanups

This commit is contained in:
mpeterv
2015-03-13 15:19:33 +03:00
parent 0da90dc597
commit 01cc387863
4 changed files with 11 additions and 11 deletions

View File

@@ -37,8 +37,8 @@ describe("tests related to commands", function()
it("handles nested commands", function()
local parser = Parser "name"
local foo = parser:command "foo"
local bar = foo:command "bar"
local baz = foo:command "baz"
foo:command "bar"
foo:command "baz"
local args = parser:parse{"foo", "bar"}
assert.same({foo = true, bar = true}, args)
@@ -57,7 +57,7 @@ describe("tests related to commands", function()
it("Detects wrong commands", function()
local parser = Parser "name"
local install = parser:command "install"
parser:command "install"
assert.has_error(function() parser:parse{"run"} end, "unknown command 'run'")
end)