spec: change way how tests srtuctured
This commit is contained in:
parent
9fc120edc5
commit
c608ddbd67
4 changed files with 0 additions and 58 deletions
19
spec/units/utils_spec.lua
Normal file
19
spec/units/utils_spec.lua
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
describe("gopher._utils", function()
|
||||
it("can be requried", function()
|
||||
require "gopher._utils"
|
||||
end)
|
||||
|
||||
it(".empty() with non-empty talbe", function()
|
||||
local empty = require("gopher._utils").empty
|
||||
local res = empty { first = "1", second = 2 }
|
||||
|
||||
assert.are.same(res, false)
|
||||
end)
|
||||
|
||||
it(".empty() with empty talbe", function()
|
||||
local empty = require("gopher._utils").empty
|
||||
local res = empty {}
|
||||
|
||||
assert.are.same(res, true)
|
||||
end)
|
||||
end)
|
||||
Loading…
Add table
Add a link
Reference in a new issue