Actions
Backport #2405
closedTest::Unit.runの条件判定が逆?
Status:
Closed
Assignee:
Description
=begin
Test::Unit.runにtrueを代入すると、単体テストが自動実行されません。
test/unit.rbには以下のような説明があるので、trueを代入した時に自動実行
したいという意図があると考えました。どちらが正しいのでしょうか?
Automatically run tests at exit?¶
def self.run?
@run ||= false
end
もし不具合なら、以下のような修正になると考えています。
--- 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
=end
Updated by nobu (Nobuyoshi Nakada) over 14 years ago
- Category set to lib
- Status changed from Open to Assigned
- Assignee set to shyouhei (Shyouhei Urabe)
=begin
ドキュメントの誤りです。このrunは過去分詞なのでしょう。
=end
Updated by shyouhei (Shyouhei Urabe) over 14 years ago
- Status changed from Assigned to Closed
=begin
This issue was solved with changeset r26096.
John, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end
Actions
Like0
Like0Like0