[rspec-devel] [ rspec-Bugs-13579 ] NoMethodError not raised for missing helper methods

noreply at rubyforge.org noreply at rubyforge.org
Sat Sep 1 13:45:50 EDT 2007


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

Category: rails plugin
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Rupert Voelcker (rupert)
Assigned to: Nobody (None)
Summary: NoMethodError not raised for missing helper methods

Initial Comment:
If in a helper spec you spec a method that doesn't exist in the helper a NoMethodError isn't raised.  This means that a spec like:

describe PeopleHelper do
  it "should return 'garbage'" do
    non_existant_helper_method.should == 'garbage'
  end
end

passes when the non_existant_helper_method doesn't exist in the helper.

I've enclosed a diff file containing a failing spec.

Having a wee look with the debugger, it goes through the end of method_missing of rails_behaviour.rb where it gets super'd up to the method_missing in prototype_helper.rb which creates a new JavaScrptProxy -this doesn't seem quite right.  Not having any idea how this part of things works I'm afraid I can't suggest anything at the moment so I'm hoping some bright spark will know straightaway what's wrong.

Cheers

Rupert

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

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


More information about the rspec-devel mailing list