Closed Tieske closed 3 years ago
Add a busted function busted.path (?) that returns the absolute path of the current test file.
busted.path
file /lua/my-project/spec/01-unit/some-unit-test_spec.lua:
/lua/my-project/spec/01-unit/some-unit-test_spec.lua
it("some test", function() assert.equal("/lua/my-project/spec/01-unit", busted.path()) assert.equal("/lua/my-project/fixtures/template.txt", busted.path("../fixtures/template.txt")) local logfile = busted.path("servroot/logs/error.log") -- /lua/my-project/spec/servroot/logs/error.log end)
Add a busted function
busted.path
(?) that returns the absolute path of the current test file.file
/lua/my-project/spec/01-unit/some-unit-test_spec.lua
: