technic-cd2025/technic/spec/test_helpers.lua
SX 79233d764a Add busted unit testing for technic
Fix test framework and luacheck, Add metadata cleanup ABM

Added busted and contentdb badges
2020-10-31 04:35:35 +02:00

27 lines
514 B
Lua

package.path = "../?.lua;./?.lua;machines/?.lua;" .. package.path
local _fixture_path = "spec/fixtures"
function fixture_path(name)
return string.format("%s/%s", _fixture_path, name)
end
local _fixtures = {}
function fixture(name)
if not _fixtures[name] then
dofile(fixture_path(name) .. ".lua")
end
_fixtures[name] = true
end
local _source_path = "."
function source_path(name)
return string.format("%s/%s", _source_path, name)
end
function sourcefile(name)
dofile(source_path(name) .. ".lua")
end