File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,36 @@ def setup
88 @const = @c1 . constants . first
99 end
1010
11+ def test_documented_eh
12+ top_level = @store . add_file 'file.rb'
13+
14+ const = RDoc ::Constant . new 'CONST' , nil , nil
15+ top_level . add_constant const
16+
17+ refute const . documented?
18+
19+ const . comment = comment 'comment'
20+
21+ assert const . documented?
22+ end
23+
24+ def test_documented_eh_alias
25+ top_level = @store . add_file 'file.rb'
26+
27+ const = RDoc ::Constant . new 'CONST' , nil , nil
28+ top_level . add_constant const
29+
30+ refute const . documented?
31+
32+ const . is_alias_for = 'C1'
33+
34+ refute const . documented?
35+
36+ @c1 . add_comment comment ( 'comment' ) , @top_level
37+
38+ assert const . documented?
39+ end
40+
1141 def test_full_name
1242 assert_equal 'C1::CONST' , @const . full_name
1343 end
You can’t perform that action at this time.
0 commit comments