aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-10-16 22:30:59 +0100
committerMatthew Wild <mwild1@gmail.com>2009-10-16 22:30:59 +0100
commit8b476b284f99ffbc4d623723d0102382a269d83b (patch)
tree0496040c1f3e87ec7de4cea12ba5bd1149e55cbb /tests
parent9167a96cfb2d519ff3dbb3aef09edc1637eab1a4 (diff)
downloadprosody-8b476b284f99ffbc4d623723d0102382a269d83b.tar.gz
prosody-8b476b284f99ffbc4d623723d0102382a269d83b.zip
tests: Have fake module() set _M to satisfy some modules
Diffstat (limited to 'tests')
-rw-r--r--tests/test.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test.lua b/tests/test.lua
index 0cec6cba..4f41cd1d 100644
--- a/tests/test.lua
+++ b/tests/test.lua
@@ -119,7 +119,7 @@ function dotest(unitname)
return;
end
- local unit = setmetatable({}, { __index = setmetatable({ module = function () end }, { __index = _G }) });
+ local unit = setmetatable({}, { __index = setmetatable({ module = function () _M = getfenv(2); end }, { __index = _G }) });
local fn = "../"..unitname:gsub("%.", "/")..".lua";
local chunk, err = loadfile(fn);