lunarmodules / luassert

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

Add default value to Spy constructor argument #156

Closed JeroenDeDauw closed 5 years ago

JeroenDeDauw commented 5 years ago

This allows replacing

mySpy = spy.new(function() end)

with

mySpy = spy.new()
JeroenDeDauw commented 5 years ago

Submitting without tests as I do not know if this change is welcome. If is it, I will happily add some tests to this PR.

ajacksified commented 5 years ago

Seems reasonable. Add some tests and 👍

JeroenDeDauw commented 5 years ago

Note that I did not run this test as I do not have lua installed

JeroenDeDauw commented 5 years ago

Would be nice to have some instructions on how to run the tests locally, especially without installing lua. In my project I added some docker stuff that allows me to run

docker-compose run --rm app busted

That won't work here since it is busted itself, and it is not really clear to me how to make it work. Seems like it gets rather involved with all the stuff in .travis/.

Tieske commented 5 years ago

@ajacksified just tested it locally. lgtm.

Tieske commented 5 years ago

@ajacksified can we merge this?