[rspec-devel] [ rspec-Bugs-9767 ] rspec_on_rails hoses

noreply at rubyforge.org noreply at rubyforge.org
Mon Apr 2 16:59:07 EDT 2007


Bugs item #9767, was opened at 2007-04-02 20:59
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=9767&group_id=797

Category: rails plugin
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Jonathan Terhorst (terhorst)
Assigned to: Nobody (None)
Summary: rspec_on_rails hoses 

Initial Comment:
This was <a href="http://rubyforge.org/pipermail/rspec-users/2006-October/000111.html">already mentioned</a> on rspec-users but I never saw any mention of it. The plugin currently overwrites the rescue_action method of a tested controller:

lib/spec/rails/runner/context/controller.rb:183: @controller_class.send(:define_method, :rescue_action) { |e| raise e }

This is bad for several reasons. First, it's not very OO. Second, many people are using this method to implement exception handling (there's even a nice <a href="http://nullstyle.com/home/exceptional">plugin for this</a>) and this behavior breaks that.

I am happy to code up a test and patch but first I need a better understanding of what this line was intended to accomplish--it seems pointless, so I must be missing something. As it stands, I commented it out and everything appears to work fine ... ?

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=9767&group_id=797


More information about the rspec-devel mailing list