Skip to content

Commit 96964f5

Browse files
committed
Add test_parse_class_the_same_of_outside
1 parent 1d8674a commit 96964f5

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/test_rdoc_parser_ruby.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,6 +1360,23 @@ def test_parse_comment_nested
13601360
assert_equal 'comment', c.comment
13611361
end
13621362

1363+
def test_parse_class_the_same_of_outside
1364+
util_parser <<-RUBY
1365+
module A
1366+
class A::B
1367+
end
1368+
end
1369+
RUBY
1370+
1371+
@parser.scan
1372+
1373+
assert_includes @store.modules_hash, 'A'
1374+
module_a = @store.find_module_named 'A'
1375+
refute_empty module_a.classes_hash
1376+
assert_includes module_a.classes_hash, 'B'
1377+
refute_includes module_a.classes_hash, 'A'
1378+
end
1379+
13631380
def test_parse_constant_with_bracket
13641381
util_parser <<-RUBY
13651382
class Klass

0 commit comments

Comments
 (0)