You don't need the if here, just do `@response.response_code == 404` - should work OK.