aboutsummaryrefslogtreecommitdiff
path: root/spec/quick_spec.lua
blob: c2d8bb590d5edb863dc64e8be8934db96ddc0e10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
local lfs = require("lfs")
local test_env = require("spec.util.test_env")
local quick = require("spec.util.quick")

describe("quick tests: #quick", function()
   before_each(function()
      test_env.setup_specs()
   end)

   local spec_quick = test_env.testing_paths.spec_dir .. "/quick"
   for f in lfs.dir(spec_quick) do
      if f:match("%.q$") then
         local tests = quick.compile(spec_quick .. "/" .. f, getfenv and getfenv() or _ENV)
         for _, t in ipairs(tests) do
            if not t.pending then
               it(t.name, t.fn)
            end
         end
      end
   end
end)