diff options
| -rw-r--r-- | spec/test4_spec.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/test4_spec.lua b/spec/test4_spec.lua index 93c4e70..111b5b6 100644 --- a/spec/test4_spec.lua +++ b/spec/test4_spec.lua @@ -105,7 +105,7 @@ gui_api = { },
}
---[[For some reason these can't be local, _ENV dosn't find them.]]
+--[[For some reason these can't be local.]]
local function mr()
return string.format("%d",math.floor(math.random()*100))
end
@@ -132,13 +132,13 @@ describe("Brok[en]gine",function() local num_optional_args = 0
local num_required_args = 0
for i,j in pairs(v.params) do
- assert(_ENV["generate_" .. j.type], "Could not find a generator for type: " .. j.type)
+ assert(_G["generate_" .. j.type], "Could not find a generator for type: " .. j.type)
if j.required then
num_required_args = num_required_args + 1
else
num_optional_args = num_optional_args + 1
end
- paramstring[#paramstring + 1] = _ENV["generate_" .. j.type]()
+ paramstring[#paramstring + 1] = _G["generate_" .. j.type]()
end
for i = num_required_args, num_required_args + num_optional_args do
it(string.format(" with %d params", i),function()
|
