mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Use capture_output instead of capture_io.
It's preparation for migrating test-unit on upstream.
This commit is contained in:
parent
7ee948c3a1
commit
2990c2cc3e
13 changed files with 87 additions and 87 deletions
|
@ -189,10 +189,10 @@ class RDoc::TestCase < (defined?(Minitest::Test) ? Minitest::Test : MiniTest::Un
|
|||
end
|
||||
|
||||
##
|
||||
# run capture_io with setting $VERBOSE = true
|
||||
# run capture_output with setting $VERBOSE = true
|
||||
|
||||
def verbose_capture_io
|
||||
capture_io do
|
||||
def verbose_capture_output
|
||||
capture_output do
|
||||
begin
|
||||
orig_verbose = $VERBOSE
|
||||
$VERBOSE = true
|
||||
|
|
|
@ -232,7 +232,7 @@ class TestRDocContext < XrefTestCase
|
|||
meth2.record_location @store.add_file 'second.rb'
|
||||
meth2.comment = comment 'second'
|
||||
|
||||
_, err = verbose_capture_io do
|
||||
_, err = verbose_capture_output do
|
||||
@context.add_method meth2
|
||||
end
|
||||
|
||||
|
@ -260,7 +260,7 @@ class TestRDocContext < XrefTestCase
|
|||
meth2.record_location @store.add_file 'second.rb'
|
||||
meth2.comment = comment 'second'
|
||||
|
||||
_, err = verbose_capture_io do
|
||||
_, err = verbose_capture_output do
|
||||
@context.add_method meth2
|
||||
end
|
||||
|
||||
|
|
|
@ -144,7 +144,7 @@ class TestRDocContextSection < RDoc::TestCase
|
|||
end
|
||||
|
||||
def test_sequence
|
||||
_, err = verbose_capture_io do
|
||||
_, err = verbose_capture_output do
|
||||
assert_match(/\ASEC\d{5}\Z/, @s.sequence)
|
||||
end
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ class TestRDocEncoding < RDoc::TestCase
|
|||
|
||||
contents = :junk
|
||||
|
||||
_, err = verbose_capture_io do
|
||||
_, err = verbose_capture_output do
|
||||
contents = RDoc::Encoding.read_file @tempfile.path, Encoding::US_ASCII
|
||||
end
|
||||
|
||||
|
@ -97,7 +97,7 @@ class TestRDocEncoding < RDoc::TestCase
|
|||
@tempfile.flush
|
||||
|
||||
contents = :junk
|
||||
_, err = verbose_capture_io do
|
||||
_, err = verbose_capture_output do
|
||||
contents = RDoc::Encoding.read_file @tempfile.path, Encoding::UTF_8
|
||||
end
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ contents of a string.
|
|||
|
||||
def test_include_file_in_other_directory
|
||||
content = nil
|
||||
out, err = capture_io do
|
||||
out, err = capture_output do
|
||||
content = @pp.include_file "test.txt", '', nil
|
||||
end
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ class TestRDocOptions < RDoc::TestCase
|
|||
skip "assumes UNIX permission model" if /mswin|mingw/ =~ RUBY_PLATFORM
|
||||
skip "assumes that euid is not root" if Process.euid == 0
|
||||
|
||||
out, err = capture_io do
|
||||
out, err = capture_output do
|
||||
temp_dir do
|
||||
FileUtils.touch 'unreadable'
|
||||
FileUtils.chmod 0, 'unreadable'
|
||||
|
@ -40,7 +40,7 @@ class TestRDocOptions < RDoc::TestCase
|
|||
def test_check_files_warn
|
||||
@options.verbosity = 2
|
||||
|
||||
out, err = verbose_capture_io do
|
||||
out, err = verbose_capture_output do
|
||||
@options.files = %w[nonexistent]
|
||||
|
||||
@options.check_files
|
||||
|
@ -218,7 +218,7 @@ rdoc_include:
|
|||
end
|
||||
|
||||
def test_parse_dash_p
|
||||
out, err = capture_io do
|
||||
out, err = capture_output do
|
||||
@options.parse %w[-p]
|
||||
end
|
||||
|
||||
|
@ -230,7 +230,7 @@ rdoc_include:
|
|||
end
|
||||
|
||||
def test_parse_dash_p_files
|
||||
out, err = capture_io do
|
||||
out, err = capture_output do
|
||||
@options.parse ['-p', File.expand_path(__FILE__)]
|
||||
end
|
||||
|
||||
|
@ -253,7 +253,7 @@ rdoc_include:
|
|||
dep_hash = RDoc::Options::DEPRECATED
|
||||
options = dep_hash.keys.sort
|
||||
|
||||
out, err = capture_io do
|
||||
out, err = capture_output do
|
||||
@options.parse options
|
||||
end
|
||||
|
||||
|
@ -278,7 +278,7 @@ rdoc_include:
|
|||
end
|
||||
|
||||
def test_parse_encoding_invalid
|
||||
out, err = capture_io do
|
||||
out, err = capture_output do
|
||||
@options.parse %w[--encoding invalid]
|
||||
end
|
||||
|
||||
|
@ -333,7 +333,7 @@ rdoc_include:
|
|||
end
|
||||
|
||||
def test_parse_h
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
begin
|
||||
@options.parse %w[-h]
|
||||
rescue SystemExit
|
||||
|
@ -345,7 +345,7 @@ rdoc_include:
|
|||
end
|
||||
|
||||
def test_parse_help
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
begin
|
||||
@options.parse %w[--help]
|
||||
rescue SystemExit
|
||||
|
@ -365,7 +365,7 @@ rdoc_include:
|
|||
end
|
||||
end
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
begin
|
||||
@options.parse %w[--help]
|
||||
rescue SystemExit
|
||||
|
@ -392,7 +392,7 @@ rdoc_include:
|
|||
end
|
||||
|
||||
def test_parse_ignore_invalid
|
||||
out, err = capture_io do
|
||||
out, err = capture_output do
|
||||
@options.parse %w[--ignore-invalid --bogus]
|
||||
end
|
||||
|
||||
|
@ -403,7 +403,7 @@ rdoc_include:
|
|||
end
|
||||
|
||||
def test_parse_ignore_invalid_default
|
||||
out, err = capture_io do
|
||||
out, err = capture_output do
|
||||
@options.parse %w[--bogus --main BLAH]
|
||||
end
|
||||
|
||||
|
@ -416,7 +416,7 @@ rdoc_include:
|
|||
end
|
||||
|
||||
def test_parse_ignore_invalid_no
|
||||
out, err = capture_io do
|
||||
out, err = capture_output do
|
||||
assert_raises SystemExit do
|
||||
@options.parse %w[--no-ignore-invalid --bogus=arg --bobogus --visibility=extended]
|
||||
end
|
||||
|
@ -429,7 +429,7 @@ rdoc_include:
|
|||
end
|
||||
|
||||
def test_parse_ignore_invalid_no_quiet
|
||||
out, err = capture_io do
|
||||
out, err = capture_output do
|
||||
assert_raises SystemExit do
|
||||
@options.parse %w[--quiet --no-ignore-invalid --bogus=arg --bobogus --visibility=extended]
|
||||
end
|
||||
|
@ -442,7 +442,7 @@ rdoc_include:
|
|||
end
|
||||
|
||||
def test_ignore_needless_arg
|
||||
out, err = capture_io do
|
||||
out, err = capture_output do
|
||||
@options.parse %w[--ri=foo]
|
||||
end
|
||||
|
||||
|
@ -452,7 +452,7 @@ rdoc_include:
|
|||
end
|
||||
|
||||
def test_ignore_missing_arg
|
||||
out, err = capture_io do
|
||||
out, err = capture_output do
|
||||
@options.parse %w[--copy-files]
|
||||
end
|
||||
|
||||
|
@ -462,7 +462,7 @@ rdoc_include:
|
|||
end
|
||||
|
||||
def test_parse_main
|
||||
out, err = capture_io do
|
||||
out, err = capture_output do
|
||||
@options.parse %w[--main MAIN]
|
||||
end
|
||||
|
||||
|
@ -473,7 +473,7 @@ rdoc_include:
|
|||
end
|
||||
|
||||
def test_parse_markup
|
||||
out, err = capture_io do
|
||||
out, err = capture_output do
|
||||
@options.parse %w[--markup tomdoc]
|
||||
end
|
||||
|
||||
|
@ -486,7 +486,7 @@ rdoc_include:
|
|||
def test_parse_page_dir
|
||||
assert_nil @options.page_dir
|
||||
|
||||
out, err = capture_io do
|
||||
out, err = capture_output do
|
||||
@options.parse %W[--page-dir #{Dir.tmpdir}]
|
||||
end
|
||||
|
||||
|
@ -508,7 +508,7 @@ rdoc_include:
|
|||
abs_page_dir = File.join dir, 'pages'
|
||||
FileUtils.mkdir abs_page_dir
|
||||
|
||||
out, err = capture_io do
|
||||
out, err = capture_output do
|
||||
@options.parse %W[--page-dir #{abs_page_dir} --root #{abs_root}]
|
||||
end
|
||||
|
||||
|
@ -530,7 +530,7 @@ rdoc_include:
|
|||
def test_parse_root
|
||||
assert_equal Pathname(Dir.pwd), @options.root
|
||||
|
||||
out, err = capture_io do
|
||||
out, err = capture_output do
|
||||
@options.parse %W[--root #{Dir.tmpdir}]
|
||||
end
|
||||
|
||||
|
@ -548,13 +548,13 @@ rdoc_include:
|
|||
@options.parse %w[-w2]
|
||||
assert_equal 2, @options.tab_width
|
||||
|
||||
_, err = capture_io do
|
||||
_, err = capture_output do
|
||||
@options.parse %w[-w=2]
|
||||
end
|
||||
|
||||
assert_match 'invalid options', err
|
||||
|
||||
_, err = capture_io do
|
||||
_, err = capture_output do
|
||||
@options.parse %w[-w0]
|
||||
end
|
||||
|
||||
|
@ -562,7 +562,7 @@ rdoc_include:
|
|||
end
|
||||
|
||||
def test_parse_template
|
||||
out, err = capture_io do
|
||||
out, err = capture_output do
|
||||
@options.parse %w[--template darkfish]
|
||||
end
|
||||
|
||||
|
@ -575,7 +575,7 @@ rdoc_include:
|
|||
end
|
||||
|
||||
def test_parse_template_nonexistent
|
||||
out, err = capture_io do
|
||||
out, err = capture_output do
|
||||
@options.parse %w[--template NONEXISTENT]
|
||||
end
|
||||
|
||||
|
@ -598,7 +598,7 @@ rdoc_include:
|
|||
|
||||
FileUtils.mkdir_p template_dir
|
||||
|
||||
out, err = capture_io do
|
||||
out, err = capture_output do
|
||||
@options.parse %w[--template load_path]
|
||||
end
|
||||
|
||||
|
@ -644,7 +644,7 @@ rdoc_include:
|
|||
end
|
||||
|
||||
def test_parse_extension_alias
|
||||
out, err = capture_io do
|
||||
out, err = capture_output do
|
||||
@options.parse %w[--extension foobar=rdoc]
|
||||
end
|
||||
|
||||
|
@ -706,7 +706,7 @@ rdoc_include:
|
|||
end
|
||||
|
||||
def test_warn
|
||||
out, err = capture_io do
|
||||
out, err = capture_output do
|
||||
@options.warn "warnings off"
|
||||
end
|
||||
|
||||
|
@ -715,7 +715,7 @@ rdoc_include:
|
|||
|
||||
@options.verbosity = 2
|
||||
|
||||
out, err = verbose_capture_io do
|
||||
out, err = verbose_capture_output do
|
||||
@options.warn "warnings on"
|
||||
end
|
||||
|
||||
|
@ -734,7 +734,7 @@ rdoc_include:
|
|||
end
|
||||
|
||||
def test_version
|
||||
out, _ = capture_io do
|
||||
out, _ = capture_output do
|
||||
begin
|
||||
@options.parse %w[--version]
|
||||
rescue SystemExit
|
||||
|
@ -743,7 +743,7 @@ rdoc_include:
|
|||
|
||||
assert out.include?(RDoc::VERSION)
|
||||
|
||||
out, _ = capture_io do
|
||||
out, _ = capture_output do
|
||||
begin
|
||||
@options.parse %w[-v]
|
||||
rescue SystemExit
|
||||
|
|
|
@ -47,7 +47,7 @@ class TestRDocParser < RDoc::TestCase
|
|||
end
|
||||
|
||||
def test_class_binary_large_japanese_rdoc
|
||||
capture_io do
|
||||
capture_output do
|
||||
begin
|
||||
extenc, Encoding.default_external =
|
||||
Encoding.default_external, Encoding::US_ASCII
|
||||
|
|
|
@ -337,7 +337,7 @@ void Init_Blah(void) {
|
|||
}
|
||||
EOF
|
||||
|
||||
_, err = verbose_capture_io do
|
||||
_, err = verbose_capture_output do
|
||||
refute util_get_class(content, 'cDate')
|
||||
end
|
||||
|
||||
|
@ -657,7 +657,7 @@ void Init_Blah(void) {
|
|||
|
||||
klass = nil
|
||||
|
||||
_, err = verbose_capture_io do
|
||||
_, err = verbose_capture_output do
|
||||
klass = util_get_class content, 'cDate'
|
||||
end
|
||||
|
||||
|
@ -680,7 +680,7 @@ void Init_Blah(void) {
|
|||
|
||||
klass = nil
|
||||
|
||||
_, err = verbose_capture_io do
|
||||
_, err = verbose_capture_output do
|
||||
klass = util_get_class content, 'cDate'
|
||||
end
|
||||
|
||||
|
@ -703,7 +703,7 @@ void Init_Blah(void) {
|
|||
|
||||
klass = nil
|
||||
|
||||
_, err = verbose_capture_io do
|
||||
_, err = verbose_capture_output do
|
||||
klass = util_get_class content, 'cDate'
|
||||
end
|
||||
|
||||
|
@ -770,7 +770,7 @@ void Init_Blah(void) {
|
|||
parser.missing_dependencies['y'] = ['y', :class, 'Y', 'Object', 'z']
|
||||
parser.missing_dependencies['z'] = ['z', :class, 'Z', 'Object', 'y']
|
||||
|
||||
_, err = verbose_capture_io do
|
||||
_, err = verbose_capture_output do
|
||||
parser.do_missing
|
||||
end
|
||||
|
||||
|
|
|
@ -902,7 +902,7 @@ end
|
|||
|
||||
def test_parse_class_lower_name_warning
|
||||
@options.verbosity = 2
|
||||
stds = capture_io do
|
||||
stds = capture_output do
|
||||
util_parser "class foo\nend"
|
||||
tk = @parser.get_tk
|
||||
@parser.parse_class @top_level, RDoc::Parser::Ruby::NORMAL, tk, @comment
|
||||
|
@ -913,7 +913,7 @@ end
|
|||
|
||||
def test_parse_syntax_error_code
|
||||
@options.verbosity = 2
|
||||
stds = capture_io do
|
||||
stds = capture_output do
|
||||
begin
|
||||
util_parser <<INVALID_CODE
|
||||
# invalid class name
|
||||
|
|
|
@ -26,7 +26,7 @@ class TestRDocRDoc < RDoc::TestCase
|
|||
temp_dir do
|
||||
options.op_dir = 'ri'
|
||||
|
||||
capture_io do
|
||||
capture_output do
|
||||
rdoc.document options
|
||||
end
|
||||
|
||||
|
@ -53,7 +53,7 @@ class TestRDocRDoc < RDoc::TestCase
|
|||
|
||||
out = nil
|
||||
temp_dir do
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
rdoc.document options
|
||||
end
|
||||
|
||||
|
@ -78,7 +78,7 @@ class TestRDocRDoc < RDoc::TestCase
|
|||
def test_handle_pipe
|
||||
$stdin = StringIO.new "hello"
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
@rdoc.handle_pipe
|
||||
end
|
||||
|
||||
|
@ -92,7 +92,7 @@ class TestRDocRDoc < RDoc::TestCase
|
|||
|
||||
@rdoc.options.markup = 'rd'
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
@rdoc.handle_pipe
|
||||
end
|
||||
|
||||
|
@ -168,7 +168,7 @@ class TestRDocRDoc < RDoc::TestCase
|
|||
|
||||
files = nil
|
||||
|
||||
out, err = verbose_capture_io do
|
||||
out, err = verbose_capture_output do
|
||||
files = @rdoc.normalized_file_list [dev]
|
||||
end
|
||||
|
||||
|
@ -259,7 +259,7 @@ class TestRDocRDoc < RDoc::TestCase
|
|||
|
||||
@rdoc.options.root = Pathname root
|
||||
|
||||
out, err = capture_io do
|
||||
out, err = capture_output do
|
||||
Dir.chdir root do
|
||||
assert_nil @rdoc.parse_file 'binary.dat'
|
||||
end
|
||||
|
@ -281,7 +281,7 @@ class TestRDocRDoc < RDoc::TestCase
|
|||
io.puts ':include: test.txt'
|
||||
end
|
||||
|
||||
out, err = capture_io do
|
||||
out, err = capture_output do
|
||||
top_level = @rdoc.parse_file 'include.txt'
|
||||
end
|
||||
assert_empty out
|
||||
|
@ -363,7 +363,7 @@ class TestRDocRDoc < RDoc::TestCase
|
|||
begin
|
||||
top_level = :bug
|
||||
|
||||
_, err = capture_io do
|
||||
_, err = capture_output do
|
||||
top_level = @rdoc.parse_file io.path
|
||||
end
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ class TestRDocRIDriver < RDoc::TestCase
|
|||
def test_self_dump
|
||||
util_store
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
RDoc::RI::Driver.dump @store1.cache_path
|
||||
end
|
||||
|
||||
|
@ -381,7 +381,7 @@ class TestRDocRIDriver < RDoc::TestCase
|
|||
doc = @RM::Document.new
|
||||
doc << @RM::IndentedParagraph.new(0, 'new, parse, foo, bar, baz')
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
driver.display doc
|
||||
end
|
||||
|
||||
|
@ -550,7 +550,7 @@ class TestRDocRIDriver < RDoc::TestCase
|
|||
doc = @RM::Document.new(
|
||||
@RM::Paragraph.new('hi'))
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
@driver.display doc
|
||||
end
|
||||
|
||||
|
@ -560,7 +560,7 @@ class TestRDocRIDriver < RDoc::TestCase
|
|||
def test_display_class
|
||||
util_store
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
@driver.display_class 'Foo::Bar'
|
||||
end
|
||||
|
||||
|
@ -584,7 +584,7 @@ class TestRDocRIDriver < RDoc::TestCase
|
|||
|
||||
@driver.show_all = true
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
@driver.display_class 'Foo::Bar'
|
||||
end
|
||||
|
||||
|
@ -606,7 +606,7 @@ class TestRDocRIDriver < RDoc::TestCase
|
|||
def test_display_class_ambiguous
|
||||
util_multi_store
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
@driver.display_class 'Ambiguous'
|
||||
end
|
||||
|
||||
|
@ -616,7 +616,7 @@ class TestRDocRIDriver < RDoc::TestCase
|
|||
def test_display_class_multi_no_doc
|
||||
util_multi_store
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
@driver.display_class 'Foo::Baz'
|
||||
end
|
||||
|
||||
|
@ -630,7 +630,7 @@ class TestRDocRIDriver < RDoc::TestCase
|
|||
def test_display_class_superclass
|
||||
util_multi_store
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
@driver.display_class 'Bar'
|
||||
end
|
||||
|
||||
|
@ -640,7 +640,7 @@ class TestRDocRIDriver < RDoc::TestCase
|
|||
def test_display_class_module
|
||||
util_store
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
@driver.display_class 'Inc'
|
||||
end
|
||||
|
||||
|
@ -648,7 +648,7 @@ class TestRDocRIDriver < RDoc::TestCase
|
|||
end
|
||||
|
||||
def test_display_class_page
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
@driver.display_class 'ruby:README'
|
||||
end
|
||||
|
||||
|
@ -658,7 +658,7 @@ class TestRDocRIDriver < RDoc::TestCase
|
|||
def test_display_method
|
||||
util_store
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
@driver.display_method 'Foo::Bar#blah'
|
||||
end
|
||||
|
||||
|
@ -670,7 +670,7 @@ class TestRDocRIDriver < RDoc::TestCase
|
|||
def test_display_method_attribute
|
||||
util_store
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
@driver.display_method 'Foo::Bar#attr'
|
||||
end
|
||||
|
||||
|
@ -681,7 +681,7 @@ class TestRDocRIDriver < RDoc::TestCase
|
|||
def test_display_method_inherited
|
||||
util_multi_store
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
@driver.display_method 'Bar#inherit'
|
||||
end
|
||||
|
||||
|
@ -692,7 +692,7 @@ class TestRDocRIDriver < RDoc::TestCase
|
|||
def test_display_method_overridden
|
||||
util_multi_store
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
@driver.display_method 'Bar#override'
|
||||
end
|
||||
|
||||
|
@ -702,7 +702,7 @@ class TestRDocRIDriver < RDoc::TestCase
|
|||
def test_display_name
|
||||
util_store
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
assert_equal true, @driver.display_name('home:README.rdoc')
|
||||
end
|
||||
|
||||
|
@ -717,7 +717,7 @@ This is a README
|
|||
def test_display_name_not_found_class
|
||||
util_store
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
assert_equal false, @driver.display_name('Foo::B')
|
||||
end
|
||||
|
||||
|
@ -734,7 +734,7 @@ Foo::Baz
|
|||
def test_display_name_not_found_method
|
||||
util_store
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
assert_equal false, @driver.display_name('Foo::Bar#b')
|
||||
end
|
||||
|
||||
|
@ -759,7 +759,7 @@ Foo::Bar#bother
|
|||
def test_display_method_params
|
||||
util_store
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
@driver.display_method 'Foo::Bar#bother'
|
||||
end
|
||||
|
||||
|
@ -769,7 +769,7 @@ Foo::Bar#bother
|
|||
def test_display_page
|
||||
util_store
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
@driver.display_page 'home:README.rdoc'
|
||||
end
|
||||
|
||||
|
@ -779,7 +779,7 @@ Foo::Bar#bother
|
|||
def test_display_page_add_extension
|
||||
util_store
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
@driver.display_page 'home:README'
|
||||
end
|
||||
|
||||
|
@ -798,7 +798,7 @@ Foo::Bar#bother
|
|||
|
||||
@store1.save_page other
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
@driver.display_page 'home:README'
|
||||
end
|
||||
|
||||
|
@ -819,7 +819,7 @@ Foo::Bar#bother
|
|||
|
||||
@store1.save_page other
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
@driver.display_page 'home:README.EXT'
|
||||
end
|
||||
|
||||
|
@ -838,7 +838,7 @@ Foo::Bar#bother
|
|||
|
||||
@store1.save_page other
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
@driver.display_page 'home:globals'
|
||||
end
|
||||
|
||||
|
@ -848,11 +848,11 @@ Foo::Bar#bother
|
|||
def test_display_page_missing
|
||||
util_store
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
@driver.display_page 'home:missing'
|
||||
end
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
@driver.display_page_list @store1
|
||||
end
|
||||
|
||||
|
@ -872,7 +872,7 @@ Foo::Bar#bother
|
|||
|
||||
@store1.save_page other
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
@driver.display_page_list @store1
|
||||
end
|
||||
|
||||
|
@ -1111,7 +1111,7 @@ Foo::Bar#bother
|
|||
def test_list_known_classes
|
||||
util_store
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
@driver.list_known_classes
|
||||
end
|
||||
|
||||
|
@ -1121,7 +1121,7 @@ Foo::Bar#bother
|
|||
def test_list_known_classes_name
|
||||
util_store
|
||||
|
||||
out, = capture_io do
|
||||
out, = capture_output do
|
||||
@driver.list_known_classes %w[F I]
|
||||
end
|
||||
|
||||
|
|
|
@ -20,19 +20,19 @@ class TestRDocTask < RDoc::TestCase
|
|||
end
|
||||
|
||||
def test_inline_source
|
||||
_, err = verbose_capture_io do
|
||||
_, err = verbose_capture_output do
|
||||
assert @t.inline_source
|
||||
end
|
||||
|
||||
assert_equal "RDoc::Task#inline_source is deprecated\n", err
|
||||
|
||||
_, err = verbose_capture_io do
|
||||
_, err = verbose_capture_output do
|
||||
@t.inline_source = false
|
||||
end
|
||||
|
||||
assert_equal "RDoc::Task#inline_source is deprecated\n", err
|
||||
|
||||
capture_io do
|
||||
capture_output do
|
||||
assert @t.inline_source
|
||||
end
|
||||
end
|
||||
|
|
|
@ -557,7 +557,7 @@ The comments associated with
|
|||
end
|
||||
|
||||
def test_to_html_tt_tag_mismatch
|
||||
_, err = verbose_capture_io do
|
||||
_, err = verbose_capture_output do
|
||||
assert_equal '<tt>hi', to_html('<tt>hi')
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue