Skip to content

Instantly share code, notes, and snippets.

@hrafnkelle
Created March 12, 2013 11:46
Show Gist options
  • Save hrafnkelle/5142295 to your computer and use it in GitHub Desktop.
Save hrafnkelle/5142295 to your computer and use it in GitHub Desktop.
Running this with the busted testing framework makes the busted runner hang with 100% cpu load
local M = {
a=function(self,msg)
self:b(msg)
end,
b=function(self,msg)
print(msg)
end
}
describe("Description", function()
it("first test", function()
local m = mock(M)
local msg = {}
m:a(msg) -- remove this line and it doesnt hang
assert.spy(m.b).was.called_with(m, msg)
end)
it("second test", function()
local s = mock(M)
end)
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment