diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..dd6cca9 --- /dev/null +++ b/.envrc @@ -0,0 +1,3 @@ +dotenv + +env_vars_required GOPHER_DIR diff --git a/.gitignore b/.gitignore index df7d859..3a9d44e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /playground/ /.tests/ +/.env diff --git a/spec/testutils.lua b/spec/testutils.lua index 177b9a1..64e0f9d 100644 --- a/spec/testutils.lua +++ b/spec/testutils.lua @@ -1,5 +1,4 @@ --- NOTE: there's a probably a better way to do this -local base_dir = vim.fn.expand "%:p:h" +local base_dir = vim.env.GOPHER_DIR or vim.fn.expand "%:p:h" local fixtures_dir = vim.fs.joinpath(base_dir, "/spec/fixtures/") ---@class gopher.TestUtils