Feature request: easier to discover line number

Hello all.

I love rspec 2’s new output. And have a tiny suggestion for it.

Currently a failure trace looks like this by default:

  1. SensibleSwing::MainWindow should not show the normal buttons in
    create mode
    Failure/Error: MainWindow.new.buttons.length.should == 12
    expected: 12
    got: 15 (using ==)

    org/jruby/RubyProc.java:268:in `call’

    spec\sensible_cinema_gui.spec.rb:412:in `SensibleSwing’

    org/jruby/RubyKernel.java:1958:in `instance_eval’

    org/jruby/RubyArray.java:2336:in `collect’

    org/jruby/RubyArray.java:2336:in `collect’

The difficulty I have in this is that it’s hard to piece through and
pick out the failure line (sensible_cinema_gui.spec.rb:412 in this case,
but it’s a bit crowded in there).

Feature request: have the output look like this:

  1. SensibleSwing::MainWindow should not show the normal buttons in
    create mode
    Failure/Error: spec\sensible_cinema_gui.spec.rb:412
    MainWindow.new.buttons.length.should == 12
    expected: 12
    got: 15 (using ==)

    org/jruby/RubyProc.java:268:in `call’

    spec\sensible_cinema_gui.spec.rb:412:in `SensibleSwing’

    org/jruby/RubyKernel.java:1958:in `instance_eval’

    org/jruby/RubyArray.java:2336:in `collect’

    org/jruby/RubyArray.java:2336:in `collect’

Or something along those lines?
Thoughts?
Thanks!
-roger-

It might also be kind to show the “innermost” failing line, to prevent
users from having to re-run the spec with -b

ex:

  1. SensibleSwing::MainWindow should warn if you watch an edited time
    frame with no edits in it
    Failure/Error: @subject.instance_variable_get(name).simulate_click
    NameError:
    undefined local variable or method `drive’ for
    #SensibleSwing::MainWindow:0xc84051

    org/jruby/RubyProc.java:268:in `call’

    org/jruby/RubyProc.java:228:in `call’

    ./lib/swing_helpers.rb:52:in `simulate_click’

    spec\sensible_cinema_gui.spec.rb:177:in `click_button’

    spec\sensible_cinema_gui.spec.rb:285:in `SensibleSwing’

    org/jruby/RubyKernel.java:1958:in `instance_eval’

    org/jruby/RubyArray.java:2336:in `collect’

    org/jruby/RubyArray.java:2336:in `collect’

doesn’t tell me where the failing local variable is, but does have lots
of extra “jruby” noise thrown in there…

Thanks!
-roger-

It might also be kind to show the “innermost” failing line, to prevent
users from having to re-run the spec with -b

Any thoughts on this one? This gets me every so often so I’d be happy
to come up with a patch for it, if it had a chance of being accepted.
Cheers!
-roger-