diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-10-24 05:13:55 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-10-24 05:13:55 +0000 |
commit | 071e1ba1f86211d742e43a67bc5e106b5a69cddf (patch) | |
tree | 73fcbad2b2178431e9873f25caff317d3eb6c92a /lib | |
parent | 98ac9b866747306edd7cd9437d74c7af51a3a9da (diff) | |
download | ruby-071e1ba1f86211d742e43a67bc5e106b5a69cddf.tar.gz |
* lib/test/unit.rb (Test::Unit::Mini#run_test_suites): ensure
output sync mode to be restored.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/test/unit.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/test/unit.rb b/lib/test/unit.rb index f722205fa4..b5b9f719b1 100644 --- a/lib/test/unit.rb +++ b/lib/test/unit.rb @@ -156,11 +156,18 @@ module Test def self.autorun at_exit { Test::Unit::RunCount.run_once { - exit(Test::Unit::Mini.new.run(ARGV) || true) - } + exit(Test::Unit::Mini.new.run(ARGV) || true) + } } unless @@installed_at_exit @@installed_at_exit = true end + + def run_test_suites(*args) + old_sync = @@out.sync if @@out.respond_to?(:sync=) + super + ensure + @@out.sync = old_sync if @@out.respond_to?(:sync=) + end end end end |