aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rdoc/test_case.rb
diff options
context:
space:
mode:
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