diff --git a/spec/global_env_def.tl b/spec/global_env_def.tl new file mode 100644 index 0000000..638a7c9 --- /dev/null +++ b/spec/global_env_def.tl @@ -0,0 +1,6 @@ +require("busted") + +-- We still can't do that with teal 0.15.2+dev. +-- The fix for now is to redeclare assert in every test file, +-- tl throws a warning but it's non-blocking, so it'll do for now. +-- global assert = require("luassert") diff --git a/spec/printer/teal_type_definition_spec.tl b/spec/printer/teal_type_definition_spec.tl index f6367ac..56d7c2c 100644 --- a/spec/printer/teal_type_definition_spec.tl +++ b/spec/printer/teal_type_definition_spec.tl @@ -1,7 +1,7 @@ -local assert = require("luassert") -local type Node = require("types.Node") -local stringx = require("pl.stringx") -local teal_type_definition_printer = require("printer.teal_type_definition") +local assert = require("luassert") +local type Node = require("awesomewm-d-tl.types.Node") +local stringx = require("pl.stringx") +local teal_type_definition_printer = require("awesomewm-d-tl.printer.teal_type_definition") local printer = teal_type_definition_printer.printer diff --git a/spec/scraper/module_doc_spec.tl b/spec/scraper/module_doc_spec.tl index d563fd4..97e5920 100644 --- a/spec/scraper/module_doc_spec.tl +++ b/spec/scraper/module_doc_spec.tl @@ -1,6 +1,6 @@ -local assert = require("luassert") -local type Node = require("types.Node") -local scraper = require("scraper.module_doc") +local assert = require("luassert") +local type Node = require("awesomewm-d-tl.types.Node") +local scraper = require("awesomewm-d-tl.scraper.module_doc") local get_doc_from_page = scraper.get_doc_from_page diff --git a/spec/tlconfig.lua b/spec/tlconfig.lua index 33aee75..8adbe5c 100644 --- a/spec/tlconfig.lua +++ b/spec/tlconfig.lua @@ -1,7 +1,7 @@ return { include_dir = { - "../src/awesomewm.d.tl", + "../src", "../types", }, - global_env_def = "busted", + global_env_def = "global_env_def", }