Re: luaunit 2+ examples?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: luaunit 2+ examples?
- From: 书呆彭, Peng Yi <nerditation@...>
- Date: 2016年5月17日 23:07:20 +0800
在 2016年5月11日 8:48, Dan Christian 写道:
I had things running with luaunit 1.5, which imports as globals.
But then I needed the luarocks version which is 2.1 and everything is
different.
There is a 3.1 out there, but it isn't packaged with luarocks.
I tried importing it like this (from the example in the source)
local LuaUnit = require('luaunit')
Tests = {}
function Tests:test1()
...
LuaUnit.assertEquals(foo, bar)
os.exit(LuaUnit.run())
But LuaUnit.assertEquals is nil.
I'm not sure how this is supposed to be used.
Dan
Have not used luaunit. if you don't have special requirement for luaunit, I'd suggest you try busted.
it is at https://github.com/Olivine-Labs/busted
--
the nerdy Peng / 书呆彭 / Sent from Thunderbird