summaryrefslogtreecommitdiff
path: root/lib/minitest
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-14 02:33:07 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-14 02:33:07 +0000
commit00aab585373614bb54f11c89267c1306533b2003 (patch)
tree96622b0369a855ba95bd4e71e0007be42ad676e0 /lib/minitest
parentbd0a9d2fb603d308086b37499773bae50065a1fa (diff)
* lib/minitest/unit.rb (Minitest::Unit#_run_suite): split test
name and its time. Thiw allows to know test's name when you are running tests and meet a test which spends long time at realtime. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/minitest')
-rw-r--r--lib/minitest/unit.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/minitest/unit.rb b/lib/minitest/unit.rb
index 65e84230dd..3e5defa374 100644
--- a/lib/minitest/unit.rb
+++ b/lib/minitest/unit.rb
@@ -656,11 +656,12 @@ module MiniTest
inst = suite.new method
inst._assertions = 0
+ print "#{suite}##{method} = " % time if @verbose
start_time = Time.now
result = inst.run self
time = Time.now - start_time
- print "#{suite}##{method} = %.2f s = " % time if @verbose
+ print "%.2f s = " % time if @verbose
print result
puts if @verbose