def METHOD_NAME(mock_fetch, install_mockery, transitive):
    """Tests basic rewiring with binary executables."""
    spec = Spec("quux").concretized()
    dep = Spec("garply cflags=-g").concretized()
    spec.package.do_install()
    dep.package.do_install()
    spliced_spec = spec.splice(dep, transitive=transitive)
    assert spec.dag_hash() != spliced_spec.dag_hash()
    spack.rewiring.rewire(spliced_spec)
    # check that the prefix exists
    assert os.path.exists(spliced_spec.prefix)
    # test that it made it into the database
    rec = spack.store.STORE.db.get_record(spliced_spec)
    installed_in_db = rec.installed if rec else False
    assert installed_in_db
    # check the file in the prefix has the correct paths
    bin_names = {"garply": "garplinator", "corge": "corgegator", "quux": "quuxifier"}
    for node in spliced_spec.traverse(root=True):
        for dep in node.traverse(root=True):
            bin_file_path = os.path.join(dep.prefix.bin, bin_names[dep.name])
            assert text_in_bin(dep.prefix, bin_file_path)