On 13 May 2009, at 16:13, Ben Mabey wrote:

Matt Wynne wrote:
I'm still bugged by the fact that when I get an exception during a feature run (e.g. Couldn't find partial) then what I see in the console is all the HTML to report that error in a browser.

I have had a few ideas for this bubbling around at the back of my mind. I wondered whether anyone else was thinking about this too.

I guess the idea would be to patch rails's ActionController#rescue_action_locally with something that threw the exception out at Cucumber rather than bubbling it up to the web. What do you think? Would it work? What are the drawbacks I haven't thought of?

cheers,
Matt Wynne
http://beta.songkick.com
http://blog.mattwynne.net


Have you tried catching the error in an After block and opening up the page? Aslak added that functionality:

https://rspec.lighthouseapp.com/projects/16211/tickets/272-pick-up-failure-on-after-hook

-Ben

I think I've actually realised this must be happening because we're using an old version of webrat - I've just set up a fresh rails app with shiny new cucumber and webrat version and it reports just the exception backtrace in the console, rather than the whole HTML error page.

That hook is handy though, thanks for the tip Ben.

Matt Wynne
http://blog.mattwynne.net
http://www.songkick.com

_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to