mockagne
is a fully dynamic mocking framework that is designed to be a Lua variant of the famous Java framework mockito.
local mockagne = require("mockagne")
local mock = mockagne.getMock()
mockagne.when(mock.say(mockagne.any())).thenAnswer("Hello world")
-- ...
mock.ask("What's your name?")
mockagne.verify(mock.ask("What's your name?"))
mockagne
is a single-file pure-Lua module with no other runtime dependencies than Lua 5.1 or later.
Dependency | Purpose | License |
---|---|---|
busted | Unit testing framework | MIT License |
mockagne
is Open Source, distributed under the terms of the MIT license.
Copyright (c) 2013 Punch Wolf Game Studios. Copyright (c) 2020 Exasol.