module ActionDispatch::Assertions::ResponseAssertions

def generate_response_message(expected, actual = @response.response_code)

def generate_response_message(expected, actual = @response.response_code)
  (+"Expected response to be a <#{code_with_name(expected)}>,"\
  " but was a <#{code_with_name(actual)}>").concat(location_if_redirected).concat(response_body_if_short)
end