Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean warnings in tests #525

Merged
merged 1 commit into from
Sep 26, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions test/test_rdoc_parser_ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -778,12 +778,13 @@ def test_parse_class_stopdoc

def test_parse_class_lower_name_warning
@options.verbosity = 2
out, err = capture_io do
stds = capture_io do
util_parser "class foo\nend"
tk = @parser.get_tk
@parser.parse_class @top_level, RDoc::Parser::Ruby::NORMAL, tk, @comment
end
assert_match /Expected class name or '<<'\. Got/, err
err = stds[1]
assert_match(/Expected class name or '<<'\. Got/, err)
end

def test_parse_multi_ghost_methods
Expand Down Expand Up @@ -1379,8 +1380,6 @@ class Klass3
klass = @store.find_class_named 'Klass'
klass2 = @store.find_class_named 'Klass2'
klass3 = @store.find_class_named 'Klass3'
constant = klass2.find_module_named 'CONSTANT'
constant2 = klass3.find_module_named 'CONSTANT_2'
assert_equal klass, klass2.constants.first.is_alias_for
refute_equal klass, klass3.constants.first.is_alias_for
assert_nil klass3.find_module_named 'CONSTANT_2'
Expand Down Expand Up @@ -3639,7 +3638,7 @@ class C
@parser.scan

c = @store.find_class_named 'C'
const_a, const_b, const_c, const_d = c.constants.sort_by(&:name)
const_a, const_b, const_c = c.constants.sort_by(&:name)

assert_equal 'CONST_A', const_a.name
assert_equal :public, const_a.visibility
Expand Down