class RSpec::Rails::Matchers::HaveHttpStatus::NumericCode
def matches?(response)
-
(Boolean)
- `true` if the numeric code matched the `response` code
Parameters:
-
response
(Object
) -- object providing an http code to match
def matches?(response) test_response = as_test_response(response) @actual = test_response.response_code.to_i expected == @actual rescue TypeError => _ignored @invalid_response = response false end