From 75c19a8f50ac9761c9c7941cc15a3a00e9649dae Mon Sep 17 00:00:00 2001 From: Jack Lawson Date: Thu, 14 Aug 2014 20:26:24 -0700 Subject: [PATCH] Clean up globals --- bin/busted | 2 +- busted/modules/files/lua.lua | 2 +- busted/outputHandlers/TAP.lua | 1 - busted/outputHandlers/junit.lua | 4 ---- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/bin/busted b/bin/busted index 7174427c..c3847735 100755 --- a/bin/busted +++ b/bin/busted @@ -140,7 +140,7 @@ local outputHandlerOptions = { deferPrint = cliArgs['defer-print'] } -outputHandler = outputHandlerLoader(cliArgs.output, cliArgs.o, outputHandlerOptions, busted) +local outputHandler = outputHandlerLoader(cliArgs.output, cliArgs.o, outputHandlerOptions, busted) outputHandler:subscribe(outputHandlerOptions) if cliArgs.s then diff --git a/busted/modules/files/lua.lua b/busted/modules/files/lua.lua index 5e0afda1..95437807 100644 --- a/busted/modules/files/lua.lua +++ b/busted/modules/files/lua.lua @@ -16,7 +16,7 @@ end ret.load = function(busted, filename) - local file + local file, err local success, err = pcall(function() file, err = loadfile(filename) diff --git a/busted/outputHandlers/TAP.lua b/busted/outputHandlers/TAP.lua index 83ff8c87..03ef4d63 100644 --- a/busted/outputHandlers/TAP.lua +++ b/busted/outputHandlers/TAP.lua @@ -11,7 +11,6 @@ return function(options, busted) while parent and (parent.name or parent.descriptor) and parent.descriptor ~= 'file' do - current_context = context.parent table.insert(names, 1, parent.name or parent.descriptor) parent = busted.context.parent(parent) end diff --git a/busted/outputHandlers/junit.lua b/busted/outputHandlers/junit.lua index ba92acb0..ce64a20d 100644 --- a/busted/outputHandlers/junit.lua +++ b/busted/outputHandlers/junit.lua @@ -44,10 +44,6 @@ return function(options, busted) end handler.error = function(element, parent, message, trace) - if status == 'failure' then - node.attr.errors = node.attr.errors + 1 - end - node:addtag('failure', { message = message }):text(trace.traceback):up()