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:
get(:index)
@controller.send(:erase_render_results)
@controller.send(:rescue_action_in_public,
ActionController::RoutingError.new(nil))
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.
grtz
Thijs
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---