Currently when a failure is reported it looks like this:
C:\dev\ruby\faster_rubygems\spec>spec
spec.faster_rubygems_cacheing.rb
F
RuntimeError in ‘FasterRubyGems cacheing Gem.bin_path should cache and
reload Gem.bin_path where possible’
assertion failed
C:/dev/ruby/faster_rubygems/spec/spec.faster_rubygems_cacheing.rb:
14:in `block (3 levels) in <top (required)>’
This is good because it tells me what line failed, but that’s about
it.
The skinny of this request is that I’d find it more useful to actually
have the code displayed that failed on line 14, in this case, the word
“fail”
so like this:
C:/dev/ruby/faster_rubygems/spec/spec.faster_rubygems_cacheing.rb:14:
“fail”
Instead of the current
C:/dev/ruby/faster_rubygems/spec/spec.faster_rubygems_cacheing.rb:
14:in `block (3 levels) in <top (required)>’
So the failure report is good, but could be improved.
Another option would be to display the line below what is currently
output, like
C:/dev/ruby/faster_rubygems/spec/spec.faster_rubygems_cacheing.rb:
14:in `block (3 levels) in <top (required)>’
fail
Or something like that.
Any thoughts there?
Thanks.
-rp
The skinny of this request is that I’d find it more useful to actually
have the code displayed that failed on line 14, in this case, the word
“fail”
…
Already done in rspec-2. Likely won’t backport it to rspec-1 for some time (if ever).
Nice. Looks like rspec-2 will fit the bill for me for now, then.
Gem speeding Gem.bin_path the fake sick way should fake guess the
right path instead of loading full rubygems for now
Failure/Error: Unable to find matching line from backtrace
spec.faster_rubygems.rb:29
spec.faster_rubygems.rb:13
Perhaps it isn’t quite windows friendly?
Thanks.
-rp
Failure/Error: Unable to find matching line from backtrace
spec.faster_rubygems.rb:29
spec.faster_rubygems.rb:13
Perhaps it isn’t quite windows friendly?
That happens now and then when the error is in code generated with
eval(string) with no file and ref numbers. Has nothing to do with
Windows as far as I know, and is the same problem we have with
ruby-debug.
Failure/Error: Unable to find matching line from backtrace
Perhaps it isn’t quite windows friendly?
That happens now and then when the error is in code generated with eval(string) with no file and ref numbers. Has nothing to do with Windows as far as I know, and is the same problem we have with ruby-debug.
Interesting.
I get the same thing with Linux.
If I add the word “fail” to an rspec, it says the same (not an eval
string…)…
Here’s the output if I run it -b
Gem speeding Gem.bin_path the fake sick way should fake guess the
right path instead of loading full rubygems for now
Failure/Error: Unable to find matching line from backtrace
spec.faster_rubygems.rb:29:in `block (3 levels) in ’
Gem speeding Gem.bin_path the fake sick way should fake guess the
right path instead of loading full rubygems for now
Failure/Error: Unable to find matching line from backtrace
spec.faster_rubygems.rb:29:in `block (3 levels) in ’