[rspec-users] improving TextMate RSpec Bundle's error output

Alex Chaffee alex at stinky.com
Fri Aug 12 19:03:14 EDT 2011

I just posted a pull request to improve the RSpec TextMate Bundle's
output in cases where the error occurs *outside* a spec -- e.g. a
syntax error. It's currently quite ugly and my patch formats it as
HTML and adds some contextual info.

patch: https://github.com/rspec/rspec-tmbundle/pull/30
screenshots: https://docs.google.com/document/pub?id=1qSWcCl2M931MCfYW2YGdXSJipnG6ZiLhMu74ubKvMl4

The reason I'm posting is not to plead for +1 love for the patch
(though that would be nice) but to ask about a feature I stuck in
there as well, that's potentially controversial. It grabs standard
error output and shows it (formatted as a PRE block) at the bottom of
the results in the output window. I say it's potentially controversial
because some people might want to use $stderr.puts as debug info in
the middle of a run; those lines currently show up just above the
relevant test name, but in this PRE patch, that proximity is lost.

So let me please take a quick poll. Who wants

A. The current behavior, where $stderr.puts (and warn, and regular
puts/p) output shows up interlaced in the textmate output window,
unformatted and unescaped

B. The behavior in my 2nd patch, where $stderr is captured and then
displayed at the end of the run, below the nice colored HTML test
results, in a PRE block so it's easier to read

C. New unimplemented behavior, where $stderr is replaced with a smart
object that wraps lines in PRE, but still interlaces them with the
more-pretty test results as they happen

Non-TextMate users need not reply :-)

 - A

Alex Chaffee - alex at stinky.com - http://alexch.github.com
Stalk me: http://friendfeed.com/alexch | http://twitter.com/alexch |

More information about the rspec-users mailing list