local manager_stub = require('zync.api.manager')
local t = require('spec.zync_test')

local stubs = {
    'clean',
    'init',
    'configure',
    'build',
    'flash',
    'run',
}

function manager_stub.load()
    for _, stub in ipairs(stubs) do
        manager_stub[stub] = t.stub(manager_stub, stub, function(_) end)
    end
    package.loaded['zync.api.manager'] = manager_stub
end

function manager_stub.revert()
    for _, stub in ipairs(stubs) do
        manager_stub[stub]:revert()
    end
    package.loaded['zync.api.manager'] = nil
end

return manager_stub
