Bug #2405: Test::Unit.rune$B$N>r7oH=Dj$,5Ue(B?
http://redmine.ruby-lang.org/issues/show/2405
e$B5/I<<Te(B: Sho H.
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Normal
ruby -v: ruby 1.8.7 (2008-08-11 patchlevel 72)
Test::Unit.rune$B$Ke(Btruee$B$rBeF~$9$k$H!"C1BN%F%9%H$,<+F0<B9T$5$l$^$;$s!#e(B
test/unit.rbe$B$K$O0J2<$N$h$&$J@bL@$,$"$k$N$G!“e(Btruee$B$rBeF~$7$?;~$K<+F0<B9Te(B
e$B$7$?$$$H$$$&0U?^$,$”$k$H9M$($^$7$?!#$I$A$i$,@5$7$$$N$G$7$g$&$+e(B?
Automatically run tests at exit?
def self.run?
@run ||= false
end
e$B$b$7IT6q9g$J$i!"0J2<$N$h$&$J=$@5$K$J$k$H9M$($F$$$^$9!#e(B
— unit.rb 2007-02-13 08:01:19.000000000 +0900
+++ unit.rb 2009-11-26 18:18:01.000000000 +0900
@@ -268,13 +268,13 @@
# Automatically run tests at exit?
def self.run?
-
@run ||= false
-
end@run ||= true
end
end
at_exit do
- unless $! || Test::Unit.run?
- if $!.nil? && Test::Unit.run?
exit Test::Unit::AutoRunner.run
end
end