def METHOD_NAME(mock_packages, mock_archive, mock_fetch, install_mockery):
    """Tests that the concretizer throws an error if we concretize to a
    deprecated spec"""
    install("libelf@0.8.13")
    install("libelf@0.8.10")
    deprecate("-y", "libelf@0.8.10", "libelf@0.8.13")
    spec = spack.spec.Spec("libelf@0.8.10")
    with pytest.raises(spack.spec.SpecDeprecatedError):
        spec.concretize()