summaryrefslogtreecommitdiff
path: root/lib/rdoc/test_case.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-29 07:01:46 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-29 07:01:46 +0000
commit07b10cd59f372498e43d7bb10ce019e782c7a548 (patch)
treebe446ad18f2474e94b6ed82032a0f75ef3267c68 /lib/rdoc/test_case.rb
parenta985c5898cb2efd83e817dd476999f28af73f763 (diff)
* lib/rdoc/test_case.rb (RDoc::TestCase#verbose_capture_io):
defined for asserts of warnings. * test/rdoc: use verbose_capture_io on asserts of warnings. they failed when tests was run with RUBYOPT=-W0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/test_case.rb')
-rw-r--r--lib/rdoc/test_case.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/rdoc/test_case.rb b/lib/rdoc/test_case.rb
index c2eb855d83..e5b7288e5a 100644
--- a/lib/rdoc/test_case.rb
+++ b/lib/rdoc/test_case.rb
@@ -151,6 +151,20 @@ class RDoc::TestCase < MiniTest::Unit::TestCase
@RM::Verbatim.new(*parts)
end
+ ##
+ # run capture_io with setting $VERBOSE = true
+
+ def verbose_capture_io
+ capture_io do
+ begin
+ orig_verbose = $VERBOSE
+ $VERBOSE = true
+ yield
+ ensure
+ $VERBOSE = orig_verbose
+ end
+ end
+ end
end
# This hack allows autoload to work when Dir.pwd is changed for Ruby 1.8 since