summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-07 19:47:47 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-07 19:47:47 +0000
commit5789992f33b0755bfd462f4edb03a37e489e7fbc (patch)
tree410fa92894cfd2c4dc75ecd59e72929faf628e44
parent13c76c07e4344d1426e5bbf3898067d939b57af6 (diff)
lib/test/unit.rb: use local output
* lib/test/unit.rb (Test::Unit::Runner#output): prefer local output to get rid of unexpected side effect in test/minitest/metametameta.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/test/unit.rb6
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index e828198b415..9e249056332 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
-Tue May 8 03:54:34 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue May 8 04:47:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/test/unit.rb (Test::Unit::Runner#output): prefer local output to
+ get rid of unexpected side effect in test/minitest/metametameta.rb.
* lib/test/unit.rb (MiniTest#run_test): show the running test in $0.
diff --git a/lib/test/unit.rb b/lib/test/unit.rb
index 90b957512e5..2d25f2f2c3f 100644
--- a/lib/test/unit.rb
+++ b/lib/test/unit.rb
@@ -655,10 +655,14 @@ module Test
alias mini_run_suite _run_suite
+ def output
+ @output || super
+ end
+
def _prepare_run(suites, type)
if @tty
@verbose ||= !options[:parallel]
- MiniTest::Unit.output = StatusLineOutput.new(self)
+ @output = StatusLineOutput.new(self)
end
if /\A\/(.*)\/\z/ =~ (filter = options[:filter])
options[:filter] = filter = Regexp.new($1)