Testing rescue_action_in_public tip

Hi All,

Here’s a trick to functional test rescue_action_in_public, I’ve been
searching in the Rails source for an hour to find it:


Calling erase_render_results after the get lets you call
rescue_action_in_public without getting DoubleRender errors. This for
example allows you to test if exception notification emails are sent
properly or if the right 404 page is rendered.



Thanks, that worked even three years later!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs