instance method
generate_response_message
Ruby on Rails 8.0.4
Since v5.2.8.1 PrivateSignature
generate_response_message(expected, actual = @response.response_code)
No documentation comment.
Parameters
-
expectedreq -
actualopt = @response.response_code
Source
# File actionpack/lib/action_dispatch/testing/assertions/response.rb, line 89
def generate_response_message(expected, actual = @response.response_code)
lambda do
(+"Expected response to be a <#{code_with_name(expected)}>,"\
" but was a <#{code_with_name(actual)}>").
concat(location_if_redirected).
concat(exception_if_present).
concat(response_body_if_short)
end
end
Defined in actionpack/lib/action_dispatch/testing/assertions/response.rb line 89
· View on GitHub
· Improve this page
· Find usages on GitHub