I use HTTP status code symbols in code in a controller such as:
render json: { auth_token: user.authentication_t
this works for me:
expect(response.response_code).to eq(Rack::Utils::SYMBOL_TO_STATUS_CODE[:not_found])