Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #9645 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

[PATCH] Current rescue_from implementation makes testing difficult

Reported by: norbert Assigned to: jeremy@bitsweat.net
Priority: normal Milestone:
Component: ActionPack Version: edge
Severity: normal Keywords: exceptions tests tiny rails2
Cc:

Description

Because the version of rescue_from that was applied yesterday (see #9449 and [7597]) calls handlers from the rescue_action method, the whole mechanism is disabled by the rescue_action override that is present in functional tests by default.

The attached patch remedies this problem by moving the handler call to perform_action.

Attachments

rescue_action_override_fix.diff (0.8 kB) - added by norbert on 09/24/07 13:25:07.

Change History

09/24/07 13:25:07 changed by norbert

  • attachment rescue_action_override_fix.diff added.

09/24/07 13:28:48 changed by norbert

So as it turns out, I didn't catch this earlier because I was still running version 2 from #9449.

And by "the rescue_action override" I meant this line:

class SectionsController; def rescue_action(e) raise e end; end

09/24/07 14:57:51 changed by david

  • keywords changed from exceptions tests tiny to exceptions tests tiny rails2.
  • owner changed from core to jeremy@bitsweat.net.
  • milestone deleted.

09/24/07 15:13:28 changed by manfred

+1 applies and looks like a good idea.

09/24/07 19:56:18 changed by bitsweat

  • status changed from new to closed.
  • resolution set to fixed.

(In [7618]) Move rescue_action_with_handler from rescue_action to perform_action so it isn't clobbered by test overrides. References #9449, closes #9645.