Skip to content

Instantly share code, notes, and snippets.

@wookay
Created August 11, 2011 06:44
Show Gist options
  • Save wookay/1139032 to your computer and use it in GitHub Desktop.
Save wookay/1139032 to your computer and use it in GitHub Desktop.
test_scrub
-- test_scrub.lua
package.path = package.path .. ";../luacat/?.lua"
require 'UnitTest'
function scrub(args)
-- TODO: implement
return {}
end
function test_scrub()
local args = {
emit = function() end,
names = function() end,
say = function() end,
}
local scrubbed = scrub(args)
local expected = {
callbacks = {
['0'] = {0, "emit"},
['1'] = {0, "names"},
['2'] = {0, "say"},
},
arguments = {
emit = "[Function]",
names = "[Function]",
say = "[Function]",
}
}
assert_equal(expected, scrubbed)
end
if is_main() then
UnitTest.run()
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment