Skip to content

Add test for lower-case class name warning #457

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

Merged
merged 1 commit into from
Jul 10, 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
10 changes: 10 additions & 0 deletions test/test_rdoc_parser_ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,16 @@ def test_parse_class_stopdoc
assert_empty @top_level.classes.first.comment
end

def test_parse_class_lower_name_warning
@options.verbosity = 2
out, err = 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
end

def test_parse_multi_ghost_methods
util_parser <<-'CLASS'
class Foo
Expand Down