def add_route!(route)
      # Raise exception if the route is existing, too
      raise InvalidRouteError.new('Route must respond to #url_for') unless valid_route?(route)
      raise ExistingRouteError.new(("Route already exists for %s" % [route.name])) if route_exists?(route)

      @routes << route
    end
def add_route!(route)
      # Raise exception if the route is existing, too
      raise InvalidRouteError.new('Route must respond to #url_for') unless valid_route?(route)
      raise ExistingRouteError.new(("Route already exists for %s" % [route.name])) if route_exists?(route)

      @routes << route
    end
Raise an exception if the route is invalid or already exists