Re -raise exceptions in stories?

I see that rails handles exceptions in stories by rendering
public/500.html,
whereas in controller specs exceptions are re-raised. Is it possible to
have
this same behaviour in stories so I can check the correct exceptions are
being raised?

View this message in context:
http://www.nabble.com/re-raise-exceptions-in-stories--tp15076254p15076254.html
Sent from the rspec-users mailing list archive at Nabble.com.

Neil M. Young wrote:

I see that rails handles exceptions in stories by rendering public/500.html,
whereas in controller specs exceptions are re-raised. Is it possible to have
this same behaviour in stories so I can check the correct exceptions are
being raised?

I do this by putting the following in my helper.rb:

ActionController::Base.class_eval do
def perform_action
perform_action_without_rescue
end
end

Dispatcher.class_eval do
def self.failsafe_response(output, status, exception = nil)
raise exception
end
end

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