class RSpec::Rails::Matchers::HaveHttpStatus::GenericStatus

def matches?(response)

Returns:
  • (Boolean) - `true` if Rack's associated numeric HTTP code matched
def matches?(response)
  test_response = as_test_response(response)
  @actual = test_response.response_code
  check_expected_status(test_response, expected)
rescue TypeError => _ignored
  @invalid_response = response
  false
end