method
code_with_name
v7.0.0 -
Show latest stable
- Class:
ActionDispatch::Assertions::ResponseAssertions
code_with_name(code_or_name)private
No documentation available.
# File actionpack/lib/action_dispatch/testing/assertions/response.rb, line 95
def code_with_name(code_or_name)
if RESPONSE_PREDICATES.values.include?("#{code_or_name}?".to_sym)
code_or_name = RESPONSE_PREDICATES.invert["#{code_or_name}?".to_sym]
end
AssertionResponse.new(code_or_name).code_and_name
end