Reputation: 6029
I recently switched to capybara 2.5.0 & webkit 1.7.1.
I have a cucumber feature in which I want to check my javascript handling of a failed ajax request.
With previous capybara version:
RestClient::BadRequest
) without rescuing it.With the new capybara version: The feature fails when the exception takes place at the controller level.
I don't want the feature to stop at that level but to continue with the error response to the browser so I can handle the error with my js.
Upvotes: 3
Views: 303
Reputation: 49890
I would guess this behavior change isn't because of the capybara update, but rather because you moved the web_console gem out of the test group. That meant exceptions were never actually being raised in the server because web_console caught them all. Now that exceptions aren't being caught Capybara is displaying them. Capybara has the Capybara.raise_server_errors setting to enable/disable that behavior.
Capybara.raise_server_errors = false
Upvotes: 3