lunarmodules / luassert

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

Confusing error message for was_not.called #58

Closed Lexicality closed 9 years ago

Lexicality commented 10 years ago
describe("foo", function()
    it("bar", function()
        local func = spy.new(function() end);
        func();
        assert.spy(func).was_not.called();
    end)
end)
-
0 successes / 1 failure / 0 errors / 0 pending : 0.0 seconds

Failure  .\tests\foobar_spec.lua @ 2
foo bar
.\tests\foobar_spec.lua:5: Expected not to be called exactly nil time(s), but it was.
o-lim commented 9 years ago

@Lexicality PR #86 fixes the error messages for was.called() and was_not.called(). Give it a try.