lunarmodules / luassert

Assertion library for Lua
MIT License
202 stars 77 forks source link

I can´t work with luassert: #6

Closed Jphumbert closed 12 years ago

Jphumbert commented 12 years ago

I'm probably missing something but I can´t see what. I have downloaded and installed luassert. I just have an error message: Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio > require("luassert") > assert.is.true(true) stdin:1: '< name >' expected near 'true'

Tieske commented 12 years ago

the error relates to true (in assert.is.true) being a Lua keyword try assert.is.equal(true, true)

Jphumbert commented 12 years ago

Thanks for your help, but it does not work ever. > require "luassert" > assert.is.equal(true, true) stdin:1: attempt to index global 'assert' (a function value) stack traceback: stdin:1: in main chunk

I read the documentation again (Readme.md) and assert.is.true should work....

Jphumbert commented 12 years ago

Ok I understand the problem: assert = require "luassert" assert.is.equal(true, true) works perfectly

If this is the correct way to use the module, I think the documentation Readme.md is not correct

ajacksified commented 12 years ago

Thanks! Updated Readme.