Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
lib/test/unit.rb: test name in $0
* lib/test/unit.rb (MiniTest#run_test): show running test name in $0.
  • Loading branch information
nobu committed May 7, 2012
commit ece25bcca96b02fdfa492e9165d49b3dad7622b8
11 changes: 11 additions & 0 deletions lib/test/unit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -793,4 +793,15 @@ def self.run(*args)
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