local parser_stub = {}

local t = require('spec.zync_test')

-- stylua: ignore start
function parser_stub:require_command(_) return self end
function parser_stub:command(_) return self end
function parser_stub:summary(_) return self end
function parser_stub:description(_) return self end
function parser_stub:option(_, _) return self end
function parser_stub:flag(_) return self end
function parser_stub:args(_) return self end
function parser_stub:count(_) return self end
function parser_stub:argname(_) return self end
function parser_stub:convert(_) return self end
-- stylua: ignore end

function parser_stub.load()
    for name, func in pairs(parser_stub) do
        if name ~= 'load' and name ~= 'revert' then
            parser_stub[name] = t.stub(parser_stub, name, func)
        end
    end
end

function parser_stub.revert()
    for name, _ in pairs(parser_stub) do
        if name ~= 'load' and name ~= 'revert' then
            parser_stub[name]:revert()
        end
    end
end

return parser_stub
