ruby-changes:18177
From: naruse <ko1@a...>
Date: Tue, 14 Dec 2010 11:33:22 +0900 (JST)
Subject: [ruby-changes:18177] Ruby:r30198 (trunk): * lib/minitest/unit.rb (Minitest::Unit#_run_suite): split test
naruse 2010-12-14 11:33:07 +0900 (Tue, 14 Dec 2010) New Revision: 30198 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30198 Log: * 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. Modified files: trunk/ChangeLog trunk/lib/minitest/unit.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 30197) +++ ChangeLog (revision 30198) @@ -1,3 +1,9 @@ +Tue Dec 14 11:27:07 2010 NARUSE, Yui <naruse@r...> + + * 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. + Tue Dec 14 11:25:20 2010 NARUSE, Yui <naruse@r...> * configure.in: Add -Werror=declaration-after-statement to default Index: lib/minitest/unit.rb =================================================================== --- lib/minitest/unit.rb (revision 30197) +++ lib/minitest/unit.rb (revision 30198) @@ -656,11 +656,12 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/