[rspec-devel] [ rspec-Bugs-7591 ] When controller is missing action method, Rspec reports misleading & amp; quot; no id found& amp; quot;

noreply at rubyforge.org noreply at rubyforge.org
Thu Jan 18 18:31:50 EST 2007


Bugs item #7591, was opened at 2007-01-05 08:09
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7591&group_id=797

Category: rails plugin
Group: None
Status: Deleted
Resolution: None
Priority: 3
Submitted By: Clint Bishop (norobotdiving)
Assigned to: Nobody (None)
Summary: When controller is missing action method, Rspec reports misleading "no id found" 

Initial Comment:
Under Rspec 0.7.5 on Rails Edge (Jan 03 2007):

The following will fail (correctly) if no "my_action" method is defined upon the my_controller controller.

To error report will read "no id found" - the standard message for a method_missing failure.

However, the error report is misleading, since we're expecting the ActionController to raise an UnknownAction exception.


Snippet:
context "Some context" do
  controller_name 'my_controller'
  
  specify "some spec" do
    xhr :post, :my_action, :a_value => true    
   end
end

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

Comment By: S. Potter (mbbx6spp)
Date: 2007-01-18 17:31

Message:
I broke down and added empty action methods, but I would also like to know what the code patch is.  I am using RSpec 0.7.5 with the 0.7.5 RSpec on Rails plugin with Rails 1.2.  I even took out custom methods and helpers in spec/spec_helper.rb to see if I still received the error on running "rake spec", which I did.

Thanks,
SP

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

Comment By: David Chelimsky (dchelimsky)
Date: 2007-01-18 13:20

Message:
Clint - I've seen this problem against edge too. What setting are you changing to alleviate it?

Thanks,
David

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

Comment By: Clint Bishop (norobotdiving)
Date: 2007-01-18 13:17

Message:
It turns out this had to do with our rails settings on edge,
and not RSpec.  It looked to be coming from RSpec from the
stack trace but it turned out to be unrelated. Should've
commented on that, sorry.

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

Comment By: David Chelimsky (dchelimsky)
Date: 2007-01-18 13:12

Message:
Who set this to deleted? Please indicate why it was changed.

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

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


More information about the rspec-devel mailing list