• Robert Speicher's avatar
    Reduce duplication in GitAccess spec around error messages · 202d6d4a
    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.
    202d6d4a
git_access.rb 8.57 KB