Skip to content

Commit

Permalink
fix: coverage by fixing busted's lua path
Browse files Browse the repository at this point in the history
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
thibaultcha committed Apr 17, 2015
1 parent 4bd4f8e commit 4ed1130
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .busted
@@ -0,0 +1,5 @@
return {
default = {
lpath = "./?.lua;"
}
}
2 changes: 1 addition & 1 deletion spec/unit/stub_coverage_spec.lua
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/utils_spec.lua
Expand Up @@ -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"))
Expand Down

0 comments on commit 4ed1130

Please sign in to comment.