Created
August 11, 2011 06:44
-
-
Save wookay/1139032 to your computer and use it in GitHub Desktop.
test_scrub
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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