lib/turn/reporter.rb in turn-0.9.2 vs lib/turn/reporter.rb in turn-0.9.3
- old
+ new
@@ -72,24 +72,24 @@
limit_backtrace(filter_backtrace(backtrace))
end
$RUBY_IGNORE_CALLERS ||= []
$RUBY_IGNORE_CALLERS.concat([
- /\/turn.*\.rb/,
+ /\/lib\/turn.*\.rb/,
/\/bin\/turn/,
- /\/minitest.*\.rb/,
+ /\/lib\/minitest.*\.rb/,
/\/test\/unit.*\.rb/
])
# Filter backtrace of unimportant entries, and applies count limit if set in
# configuration. Setting $DEBUG to true will deactivate filter, or if the filter
# happens to remove all backtrace entries it will revert to the full backtrace,
# as that probably means there was an issue with the test harness itself.
def filter_backtrace(backtrace)
return [] unless backtrace
bt = backtrace.dup
- bt.reject!{ |line| $RUBY_IGNORE_CALLERS.any?{ |re| re =~ line } } unless $DEBUG
+ bt = bt.reject{ |line| $RUBY_IGNORE_CALLERS.any?{ |re| re =~ line } } unless $DEBUG
#bt.reject!{ |line| line.rindex('minitest') }
#bt.reject!{ |line| line.rindex('test/unit') }
#bt.reject!{ |line| line.rindex('lib/turn') }
#bt.reject!{ |line| line.rindex('bin/turn') }
bt = backtrace if bt.empty? # if empty just dump the whole thing
@@ -103,11 +103,11 @@
end
#
def naturalized_name(test)
if @natural
- " #{test.name.gsub("test_", "").gsub(/_/, " ")}"
+ " #{test.name.gsub("test_", "").gsub(/_/, " ")}"
else
" #{test.name}"
end
end
@@ -117,10 +117,10 @@
h, t = t.divmod(60)
m, t = t.divmod(60)
s = t.truncate
f = ((t - s) * 1000).to_i
- "%01d:%02d:%02d:%03d" % [h,m,s,f]
+ "%01d:%02d:%02d.%03d" % [h,m,s,f]
end
end
end