lib/ratebeer/brewery.rb
def validate_brewery
        error_message = "This brewer, ID##{id}, is no longer in the database. "\
                        'RateBeer Home'
        if @doc.at_css('body p').text == error_message
          raise PageNotFoundError.new("Brewery not found - #{id}")
        end
      end
# Validates whether the brewery with the given ID exists.
#
# Throws an exception if the brewery does not exist.
Validates whether the brewery with the given ID exists.
Throws an exception if the brewery does not exist.
Validates whether the brewery with the given ID exists . Throws an exception if the brewery does not exist .
def validate_brewery
        error_message = "This brewer, ID##{id}, is no longer in the database. "\
                        'RateBeer Home'
        if @doc.at_css('body p').text == error_message
          raise PageNotFoundError.new("Brewery not found - #{id}")
        end
      end
def validate_brewery error_message = "This brewer, ID##{id}, is no longer in the database. " 'RateBeer Home' if @doc . at_css ( 'body p' ) . text == error_message raise PageNotFoundError . new ( "Brewery not found - #{id}" ) end end
Validates whether the brewery with the given ID exists.
Validates whether the brewery with the given ID exists .