Allows Lua modules to be overridden during testing. See https://github.com/thlorenz/proxyquire.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
rockspecs
spec
src
.busted
.gitignore
LICENSE
README.md

README.md

proxyquire.lua

Allows Lua modules to be overridden during testing. See https://github.com/thlorenz/proxyquire.

Example

local fake_module_1 = { ... }
local fake_module_2 = { ... }

local module_under_test = proxyquire('module_under_test', {
  module_1 = fake_module_1,
  module_2 = fake_module_2
})