Skip to content

rescue_from not testable in 3.2 integration tests #5657

@jrochkind

Description

@jrochkind

I have a Rails app with a perfectly standard 'rescue_from' that catches certain exceptions (like ActiveRecord::RecordNotFound) and returns a 404 response.

This does not seem to be testable in a 3.2.2 integration test.

I write a rails integration test::unit with a assert_response(:missing) -- but the exception does not seem to be rescued with the rescue_from, the rescue_from is not being applied. The exception propogates all the way to the top and results in an Error reported, instead of Success.

See also this problem reported by someone else for functional level tests at: http://stackoverflow.com/questions/9286065/rescue-from-in-functional-integration-tests-in-rails-3-2

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions