# Rescue\_from and assert\_raise

**URL:** <https://www.ruby-forum.com/t/rescue-from-and-assert-raise/151710>\
**Category:** Rails\
**Created:** [October 24, 2008, 6:15pm UTC](https://www.ruby-forum.com/t/rescue-from-and-assert-raise/151710 "2008-10-24T18:15:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![avathartri](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a4c791/32.png) [@avathartri](https://www.ruby-forum.com/u/avathartri)\
**Post date:** [October 24, 2008, 6:15pm UTC](https://www.ruby-forum.com/t/rescue-from-and-assert-raise/151710/1 "2008-10-24T18:15:34Z")

</div>

Since commit 5e3517ea7b9fbd460f772bffc9212d882011f2bc, rescue\_from is  
now being handled in tests. I’ve been using rescue\_from to handle  
custom exceptions and testing that those exceptions are raised in  
functional tests with assert\_raise. This no longer works now. What’s  
the proper way to test this now?

---

<div class="post-metadata">

**Author:** ![avathartri](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a4c791/32.png) [@avathartri](https://www.ruby-forum.com/u/avathartri)\
**Post date:** [November 4, 2008, 2:17pm UTC](https://www.ruby-forum.com/t/rescue-from-and-assert-raise/151710/2 "2008-11-04T14:17:30Z")

</div>

Anyone have any input on this?
