1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

lib/test/unit.rb: test name in $0

* lib/test/unit.rb (MiniTest#run_test): show the running test in $0.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-05-07 18:54:37 +00:00
parent fbebe84864
commit 13c76c07e4
2 changed files with 14 additions and 1 deletions

View file

@ -1,4 +1,6 @@
Tue May 8 03:54:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
Tue May 8 03:54:34 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/test/unit.rb (MiniTest#run_test): show the running test in $0.
* lib/test/unit.rb (Test::Unit::StatusLineOutput): new class to output
in status line.

View file

@ -786,4 +786,15 @@ module Test
end
end
class MiniTest::Unit::TestCase
undef run_test
def run_test(name)
progname, $0 = $0, "#{$0}: #{self.class}##{name}"
self.__send__(name)
ensure
$@[-caller.size, 1] = [] if $@
$0 = progname
end
end
Test::Unit::Runner.autorun