ruby tests - error messages don't include line numbers or file name
Posted
by
joshs
on Stack Overflow
See other posts from Stack Overflow
or by joshs
Published on 2010-12-23T17:52:06Z
Indexed on
2010/12/23
17:54 UTC
Read the original article
Hit count: 289
ruby-on-rails
|ruby
Hi all,
How do I get line numbers to be reported with my errors when testing. Here is what I get back on a typical error:
josh@josh-laptop:~/d/test$ ruby unit/line_test.rb -n test_update
Loaded suite unit/line_test
Started
E
Finished in 0.066663 seconds.
1) Error:
test_update(LineTest):
NameError: undefined local variable or method `sdf' for
#<LineTest:0xb6e61304>
1 tests, 0 assertions, 0 failures, 1 errors
It is tough to debug without a line number and filename. From the code samples I've seen, people generally get back a more verbose error reports. How do I enable this?
Thanks!
© Stack Overflow or respective owner