[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:53:40 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 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