[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 14:27:06 EDT 2007
Bugs item #13141, was opened at 2007-08-16 21: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: David Chelimsky (dchelimsky)
Date: 2007-08-21 18:27
Message:
Jay's problem is that the filtered backtrace is lying about the location of the error. The backtrace you posted is a complete backtrace and tells you exactly where to look to debug the problem. Two completely separate issues.
----------------------------------------------------------------------
Comment By: Ryan Bates (ryanb)
Date: 2007-08-21 18:22
Message:
Is this problem unrelated to the backtrace tweaker then? From my understanding that just removes some lines of the backtrace.
Either way, I'm sure my problem is the same as mentioned in this ticket. It's a helper spec and I'm getting the same error message. Here's the full backtrace: http://pastie.caboo.se/89745
I'm on edge rails as you can probably tell. Maybe that is part of the problem?
----------------------------------------------------------------------
Comment By: David Chelimsky (dchelimsky)
Date: 2007-08-21 17:53
Message:
Ryan - this is a request for a different backtrace, not a full backtrace. You can already get a full backtrace with the -b option.
----------------------------------------------------------------------
Comment By: Ryan Bates (ryanb)
Date: 2007-08-21 17: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