lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 09/28/2012 10:42 PM, Elias Barrionovo wrote:
George, I'm not sure what the problem is, but I have some suggestions:

1) Try defining your testcase with package.seeall, like in lunit's
documentation [1]:
     module( "my_testcase", lunit.testcase, package.seeall )

2)  It's been long since I last used lunit, but if I remeber
correctly, you should put the functions / moduels you use on local
variables before requiring lunit:

     local print = print
     require 'lunit'
     module("my_testcase", lunit.testcase, package.seeall)
     assert_function(print)


I didn't test the suggestions / codes above, but I hope they are useful.


Thank you Elias! I put my require back where it belongs:

require "lunit"
require "log"

and added package.seeall

module( "log_tests", lunit.testcase, package.seeall )

and now it works!!
Best!
george