• Robert Speicher's avatar
    Reduce duplication in GitAccess spec around error messages · 5b37f21b
    Robert Speicher authored
    - Adds a new `ProjectMovedError` class to encapsulate that error
      condition. Inherits from `NotFoundError` so existing rescues should
      continue to work.
    - Separating that condition out of `NotFoundError` allowed us to
      simplify the `raise_not_found` helper and avoid repeating the literal
      string.
    - Spec makes use of `ERROR_MESSAGES` hash to avoid repeating literal
      error message strings.
    5b37f21b
git_access.rb 7.13 KB