Permalink
Browse files

fix: coverage by fixing busted's lua path

By default busted lua path is './src', which broke since
b60eec9. This gives busted the
'./?.lua' path, which works for require "kong.*".
  • Loading branch information...
1 parent 4bd4f8e commit 4ed1130835f29fa015769d9f5069e2f9e145f71e @thibaultcha thibaultcha committed Apr 17, 2015
Showing with 7 additions and 2 deletions.
  1. +5 −0 .busted
  2. +1 −1 spec/unit/stub_coverage_spec.lua
  3. +1 −1 spec/unit/utils_spec.lua
View
@@ -0,0 +1,5 @@
+return {
+ default = {
+ lpath = "./?.lua;"
+ }
+}
@@ -6,7 +6,7 @@ local IO = require "kong.tools.io"
-- Stub DAO for lapis controllers
_G.dao = {}
-local lua_sources = IO.retrieve_files(".//kong", { exclude_dir_pattern = "cli", file_pattern = ".lua" })
+local lua_sources = IO.retrieve_files("./kong", { exclude_dir_pattern = "cli", file_pattern = ".lua" })
for _, source_link in ipairs(lua_sources) do
local source_file = dofile(source_link)
@@ -5,7 +5,7 @@ describe("Utils #tools", function()
describe("Stringy", function()
- it("should work when using startsiwth", function()
+ it("should work when using startsiwth", function()
local stringy = require "stringy"
assert.truthy(stringy.startswith("hello", "he"))
assert.falsy(stringy.startswith("hello", "HE"))

0 comments on commit 4ed1130

Please sign in to comment.