summaryrefslogtreecommitdiff
path: root/spec/help_spec.lua
blob: 70dc5a7ee0d4f26869d48a4de841f3fe94068911 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
local test_env = require("spec.util.test_env")
local run = test_env.run

test_env.unload_luarocks()

describe("luarocks help #integration", function()

   before_each(function()
      test_env.setup_specs()
   end)

   it("with no flags/arguments", function()
      assert.is_true(run.luarocks_bool("help"))
   end)

   it("invalid argument", function()
      assert.is_false(run.luarocks_bool("help invalid"))
   end)
   
   it("config", function()
      assert.is_true(run.luarocks_bool("help config"))
   end)
   
   it("luarocks-admin help with no flags/arguments", function()
      assert.is_true(run.luarocks_admin_bool(test_env.quiet("help")))
   end)
end)