Forum: Ruby on Rails Testing rescue_action_in_public tip

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
4a1379eb0f10e1dd0e1466bfbf0f8245?d=identicon&s=25 Thijs Cadier (Guest)
on 2007-03-05 17:25
(Received via mailing list)
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.


64ac4afdcf405be710b07ec4a8679a74?d=identicon&s=25 Sole One (soleone)
on 2010-07-23 19:22
Thanks, that worked even three years later!
This topic is locked and can not be replied to.