def METHOD_NAME(self, env, spec, path=None):
    path = path or spec.name
    # check in memory representation
    assert spec.name in env.dev_specs
    dev_specs_entry = env.dev_specs[spec.name]
    assert dev_specs_entry["path"] == path
    assert dev_specs_entry["spec"] == str(spec)
    # check yaml representation
    yaml = env.manifest[ev.TOP_LEVEL_KEY]
    assert spec.name in yaml["develop"]
    yaml_entry = yaml["develop"][spec.name]
    assert yaml_entry["spec"] == str(spec)
    if path == spec.name:
        # default paths aren't written out
        assert "path" not in yaml_entry
    else:
        assert yaml_entry["path"] == path