def METHOD_NAME(monkeypatch, tmpdir):
    expected_path = os.path.join(str(tmpdir), "x")
    def fake_stage(pkg, mirror_only=False):
        assert pkg.path == expected_path
    monkeypatch.setattr(spack.package_base.PackageBase, "do_stage", fake_stage)
    return expected_path