[rspec-devel] [ rspec-Bugs-13141 ] backtrace should only be tweaked at end, not beginning
noreply at rubyforge.org
noreply at rubyforge.org
Tue Aug 21 13:39:29 EDT 2007
Bugs item #13141, was opened at 2007-08-16 14:15
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=13141&group_id=797
Category: runner module
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Jay Levitt (jaylev)
Assigned to: Nobody (None)
Summary: backtrace should only be tweaked at end, not beginning
Initial Comment:
Imagine this failing view spec:
describe "this spec" do
it "should fail" do
form_for(nil,nil){}
end
end
The output is:
NoMethodError in 'LabelledBuilderHelper providing labelled_form_for should fail'
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.<<
./spec/helpers/labelled_builder_helper_spec.rb:4:
script/spec:4:
But of course there is no << in line 4 of this spec. The error happened inside form_for, and thus the error message is tweaked away.
I think tweak_backtrace should only eliminate those matching lines that occur at the end of the backtrace - i.e. the many parent classes of rails. Ya?
----------------------------------------------------------------------
Comment By: Ryan Bates (ryanb)
Date: 2007-08-21 10:39
Message:
+1
I'm running into this problem and it makes it very difficult to debug without a full stack trace.
----------------------------------------------------------------------
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=13141&group_id=797
More information about the rspec-devel
mailing list