rdoc 4.0.1 → 4.1.0.preview.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rdoc might be problematic. Click here for more details.

Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/.autotest +1 -3
  5. data/{DEVELOPERS.rdoc → CONTRIBUTING.rdoc} +28 -3
  6. data/ExampleMarkdown.md +37 -0
  7. data/ExampleRDoc.rdoc +208 -0
  8. data/History.rdoc +81 -0
  9. data/Manifest.txt +11 -2
  10. data/README.rdoc +5 -5
  11. data/Rakefile +34 -4
  12. data/lib/rdoc.rb +4 -3
  13. data/lib/rdoc/any_method.rb +48 -4
  14. data/lib/rdoc/class_module.rb +16 -2
  15. data/lib/rdoc/code_object.rb +85 -24
  16. data/lib/rdoc/comment.rb +0 -3
  17. data/lib/rdoc/constant.rb +9 -1
  18. data/lib/rdoc/context.rb +20 -2
  19. data/lib/rdoc/cross_reference.rb +1 -1
  20. data/lib/rdoc/extend.rb +4 -112
  21. data/lib/rdoc/generator/darkfish.rb +46 -7
  22. data/lib/rdoc/generator/template/darkfish/_footer.rhtml +4 -4
  23. data/lib/rdoc/generator/template/darkfish/_head.rhtml +14 -8
  24. data/lib/rdoc/generator/template/darkfish/_sidebar_VCS_info.rhtml +4 -3
  25. data/lib/rdoc/generator/template/darkfish/_sidebar_classes.rhtml +3 -3
  26. data/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +3 -4
  27. data/lib/rdoc/generator/template/darkfish/_sidebar_in_files.rhtml +4 -3
  28. data/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml +3 -4
  29. data/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +3 -3
  30. data/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml +4 -4
  31. data/lib/rdoc/generator/template/darkfish/_sidebar_navigation.rhtml +9 -5
  32. data/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +5 -5
  33. data/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml +4 -3
  34. data/lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml +12 -7
  35. data/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml +5 -4
  36. data/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +6 -7
  37. data/lib/rdoc/generator/template/darkfish/class.rhtml +36 -41
  38. data/lib/rdoc/generator/template/darkfish/fonts.css +167 -0
  39. data/lib/rdoc/generator/template/darkfish/fonts/Lato-Light.ttf +0 -0
  40. data/lib/rdoc/generator/template/darkfish/fonts/Lato-LightItalic.ttf +0 -0
  41. data/lib/rdoc/generator/template/darkfish/fonts/Lato-Regular.ttf +0 -0
  42. data/lib/rdoc/generator/template/darkfish/fonts/Lato-RegularItalic.ttf +0 -0
  43. data/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Bold.ttf +0 -0
  44. data/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Regular.ttf +0 -0
  45. data/lib/rdoc/generator/template/darkfish/images/add.png +0 -0
  46. data/lib/rdoc/generator/template/darkfish/images/arrow_up.png +0 -0
  47. data/lib/rdoc/generator/template/darkfish/images/delete.png +0 -0
  48. data/lib/rdoc/generator/template/darkfish/images/tag_blue.png +0 -0
  49. data/lib/rdoc/generator/template/darkfish/index.rhtml +11 -7
  50. data/lib/rdoc/generator/template/darkfish/js/darkfish.js +0 -15
  51. data/lib/rdoc/generator/template/darkfish/js/search.js +12 -4
  52. data/lib/rdoc/generator/template/darkfish/page.rhtml +9 -9
  53. data/lib/rdoc/generator/template/darkfish/rdoc.css +226 -241
  54. data/lib/rdoc/generator/template/darkfish/servlet_not_found.rhtml +5 -5
  55. data/lib/rdoc/generator/template/darkfish/servlet_root.rhtml +13 -6
  56. data/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +17 -14
  57. data/lib/rdoc/include.rb +4 -114
  58. data/lib/rdoc/known_classes.rb +1 -0
  59. data/lib/rdoc/markdown.kpeg +126 -117
  60. data/lib/rdoc/markdown.rb +404 -389
  61. data/lib/rdoc/markdown/literals_1_8.kpeg +1 -1
  62. data/lib/rdoc/markdown/literals_1_8.rb +15 -12
  63. data/lib/rdoc/markdown/literals_1_9.kpeg +1 -1
  64. data/lib/rdoc/markdown/literals_1_9.rb +15 -12
  65. data/lib/rdoc/markup.rb +10 -13
  66. data/lib/rdoc/markup/attribute_manager.rb +3 -2
  67. data/lib/rdoc/markup/formatter.rb +3 -3
  68. data/lib/rdoc/markup/heading.rb +13 -0
  69. data/lib/rdoc/markup/parser.rb +10 -3
  70. data/lib/rdoc/markup/pre_process.rb +1 -1
  71. data/lib/rdoc/markup/to_html.rb +46 -31
  72. data/lib/rdoc/markup/to_html_crossref.rb +3 -0
  73. data/lib/rdoc/markup/to_joined_paragraph.rb +1 -1
  74. data/lib/rdoc/markup/to_markdown.rb +7 -5
  75. data/lib/rdoc/markup/verbatim.rb +1 -1
  76. data/lib/rdoc/method_attr.rb +13 -1
  77. data/lib/rdoc/mixin.rb +120 -0
  78. data/lib/rdoc/normal_class.rb +4 -0
  79. data/lib/rdoc/normal_module.rb +4 -0
  80. data/lib/rdoc/options.rb +42 -8
  81. data/lib/rdoc/parser.rb +4 -2
  82. data/lib/rdoc/parser/c.rb +13 -7
  83. data/lib/rdoc/parser/ruby.rb +683 -480
  84. data/lib/rdoc/rdoc.rb +4 -3
  85. data/lib/rdoc/ri/driver.rb +174 -103
  86. data/lib/rdoc/ri/paths.rb +6 -6
  87. data/lib/rdoc/ruby_lex.rb +125 -102
  88. data/lib/rdoc/ruby_token.rb +41 -40
  89. data/lib/rdoc/servlet.rb +16 -6
  90. data/lib/rdoc/stats.rb +61 -48
  91. data/lib/rdoc/store.rb +5 -3
  92. data/lib/rdoc/test_case.rb +39 -0
  93. data/lib/rdoc/tom_doc.rb +28 -4
  94. data/lib/rdoc/top_level.rb +2 -2
  95. data/test/test_rdoc_any_method.rb +104 -1
  96. data/test/test_rdoc_class_module.rb +9 -15
  97. data/test/test_rdoc_code_object.rb +133 -8
  98. data/test/test_rdoc_context.rb +17 -0
  99. data/test/test_rdoc_context_section.rb +0 -7
  100. data/test/test_rdoc_cross_reference.rb +4 -3
  101. data/test/test_rdoc_generator_darkfish.rb +61 -19
  102. data/test/test_rdoc_generator_json_index.rb +0 -11
  103. data/test/test_rdoc_generator_ri.rb +0 -8
  104. data/test/test_rdoc_markdown.rb +15 -12
  105. data/test/test_rdoc_markdown_test.rb +0 -7
  106. data/test/test_rdoc_markup_attribute_manager.rb +121 -0
  107. data/test/test_rdoc_markup_document.rb +0 -7
  108. data/test/test_rdoc_markup_formatter.rb +29 -3
  109. data/test/test_rdoc_markup_heading.rb +9 -0
  110. data/test/test_rdoc_markup_parser.rb +0 -7
  111. data/test/test_rdoc_markup_pre_process.rb +15 -3
  112. data/test/test_rdoc_markup_raw.rb +0 -7
  113. data/test/test_rdoc_markup_to_html.rb +50 -8
  114. data/test/test_rdoc_markup_to_html_crossref.rb +7 -0
  115. data/test/test_rdoc_markup_to_html_snippet.rb +4 -4
  116. data/test/test_rdoc_markup_to_markdown.rb +6 -0
  117. data/test/test_rdoc_method_attr.rb +8 -0
  118. data/test/test_rdoc_normal_class.rb +5 -0
  119. data/test/test_rdoc_normal_module.rb +5 -0
  120. data/test/test_rdoc_options.rb +61 -22
  121. data/test/test_rdoc_parser.rb +10 -0
  122. data/test/test_rdoc_parser_c.rb +17 -5
  123. data/test/test_rdoc_parser_changelog.rb +0 -7
  124. data/test/test_rdoc_parser_rd.rb +0 -7
  125. data/test/test_rdoc_parser_ruby.rb +305 -28
  126. data/test/test_rdoc_rd_block_parser.rb +0 -8
  127. data/test/test_rdoc_rd_inline_parser.rb +0 -1
  128. data/test/test_rdoc_rdoc.rb +27 -1
  129. data/test/test_rdoc_ri_driver.rb +19 -7
  130. data/test/test_rdoc_ruby_lex.rb +116 -9
  131. data/test/test_rdoc_rubygems_hook.rb +1 -1
  132. data/test/test_rdoc_servlet.rb +44 -6
  133. data/test/test_rdoc_stats.rb +161 -141
  134. data/test/test_rdoc_store.rb +11 -19
  135. data/test/test_rdoc_text.rb +0 -7
  136. data/test/test_rdoc_tom_doc.rb +44 -16
  137. data/test/xref_test_case.rb +2 -0
  138. metadata +28 -27
  139. metadata.gz.sig +0 -0
  140. data/test/test_attribute_manager.rb +0 -120
@@ -30,7 +30,7 @@ class RDoc::TopLevel < RDoc::Context
30
30
  attr_accessor :diagram # :nodoc:
31
31
 
32
32
  ##
33
- # The parser that processed this file
33
+ # The parser class that processed this file
34
34
 
35
35
  attr_accessor :parser
36
36
 
@@ -98,7 +98,7 @@ class RDoc::TopLevel < RDoc::Context
98
98
 
99
99
  ##
100
100
  # Adds class or module +mod+. Used in the building phase
101
- # by the ruby parser.
101
+ # by the Ruby parser.
102
102
 
103
103
  def add_to_classes_or_modules mod
104
104
  @classes_or_modules << mod
@@ -38,10 +38,39 @@ method(a, b) { |c, d| ... }
38
38
  assert_equal 'my_c1_m', @c1_m.c_function
39
39
  end
40
40
 
41
+ def test_call_seq_equals
42
+ m = RDoc::AnyMethod.new nil, nil
43
+
44
+ m.call_seq = ''
45
+
46
+ assert_nil m.call_seq
47
+
48
+ m.call_seq = 'foo'
49
+
50
+ assert_equal 'foo', m.call_seq
51
+ end
52
+
41
53
  def test_full_name
42
54
  assert_equal 'C1::m', @c1.method_list.first.full_name
43
55
  end
44
56
 
57
+ def test_is_alias_for
58
+ assert_equal @c2_b, @c2_a.is_alias_for
59
+
60
+ # set string on instance variable
61
+ loaded = Marshal.load Marshal.dump @c2_a
62
+
63
+ loaded.store = @store
64
+
65
+ assert_equal @c2_b, loaded.is_alias_for, 'Marshal.load'
66
+
67
+ m1 = RDoc::AnyMethod.new nil, 'm1'
68
+ m1.store = @store
69
+ m1.instance_variable_set :@is_alias_for, ['Missing', false, 'method']
70
+
71
+ assert_nil m1.is_alias_for, 'missing alias'
72
+ end
73
+
45
74
  def test_markup_code
46
75
  tokens = [
47
76
  RDoc::RubyToken::TkCONSTANT. new(0, 0, 0, 'CONSTANT'),
@@ -101,11 +130,14 @@ method(a, b) { |c, d| ... }
101
130
  end
102
131
 
103
132
  def test_marshal_load_aliased_method
104
- aliased_method = Marshal.load Marshal.dump(@c2.method_list.last)
133
+ aliased_method = Marshal.load Marshal.dump(@c2_a)
134
+
135
+ aliased_method.store = @store
105
136
 
106
137
  assert_equal 'C2#a', aliased_method.full_name
107
138
  assert_equal 'C2', aliased_method.parent_name
108
139
  assert_equal '()', aliased_method.params
140
+ assert_equal @c2_b, aliased_method.is_alias_for, 'is_alias_for'
109
141
  assert aliased_method.display?
110
142
  end
111
143
 
@@ -170,16 +202,87 @@ method(a, b) { |c, d| ... }
170
202
  assert_equal nil, loaded.file
171
203
  assert_equal cm, loaded.parent
172
204
  assert_equal section, loaded.section
205
+ assert_nil loaded.is_alias_for
173
206
 
174
207
  assert loaded.display?
175
208
  end
176
209
 
210
+ def test_marshal_dump_version_2
211
+ @store.path = Dir.tmpdir
212
+ top_level = @store.add_file 'file.rb'
213
+
214
+ m = RDoc::AnyMethod.new nil, 'method'
215
+ m.block_params = 'some_block'
216
+ m.call_seq = 'call_seq'
217
+ m.comment = 'this is a comment'
218
+ m.params = 'param'
219
+ m.record_location top_level
220
+
221
+ cm = top_level.add_class RDoc::ClassModule, 'Klass'
222
+ cm.add_method m
223
+
224
+ section = cm.sections.first
225
+
226
+ al = RDoc::Alias.new nil, 'method', 'aliased', 'alias comment'
227
+ al_m = m.add_alias al, cm
228
+
229
+ loaded = Marshal.load "\x04\bU:\x14RDoc::AnyMethod[\x14i\bI" +
230
+ "\"\vmethod\x06:\x06ETI" +
231
+ "\"\x11Klass#method\x06;\x06T0:\vpublic" +
232
+ "o:\eRDoc::Markup::Document\b:\v@parts[\x06" +
233
+ "o:\x1CRDoc::Markup::Paragraph\x06;\t[\x06I" +
234
+ "\"\x16this is a comment\x06;\x06T:\n@file0" +
235
+ ":0@omit_headings_from_table_of_contents_below0" +
236
+ "I\"\rcall_seq\x06;\x06TI\"\x0Fsome_block\x06" +
237
+ ";\x06T[\x06[\aI\"\faliased\x06;\x06To;\b\b;\t" +
238
+ "[\x06o;\n\x06;\t[\x06I\"\x12alias comment\x06" +
239
+ ";\x06T;\v0;\f0I\"\nparam\x06;\x06TI" +
240
+ "\"\ffile.rb\x06;\x06TFI\"\nKlass\x06;\x06T" +
241
+ "c\x16RDoc::ClassModule0"
242
+
243
+ loaded.store = @store
244
+
245
+ comment = doc(para('this is a comment'))
246
+
247
+ assert_equal m, loaded
248
+
249
+ assert_equal [al_m.name], loaded.aliases.map { |alas| alas.name }
250
+ assert_equal 'some_block', loaded.block_params
251
+ assert_equal 'call_seq', loaded.call_seq
252
+ assert_equal comment, loaded.comment
253
+ assert_equal top_level, loaded.file
254
+ assert_equal 'Klass#method', loaded.full_name
255
+ assert_equal 'method', loaded.name
256
+ assert_equal 'param', loaded.params
257
+ assert_equal nil, loaded.singleton # defaults to nil
258
+ assert_equal :public, loaded.visibility
259
+ assert_equal cm, loaded.parent
260
+ assert_equal section, loaded.section
261
+ assert_nil loaded.is_alias_for
262
+ end
263
+
177
264
  def test_name
178
265
  m = RDoc::AnyMethod.new nil, nil
179
266
 
180
267
  assert_nil m.name
181
268
  end
182
269
 
270
+ def test_name_call_seq
271
+ m = RDoc::AnyMethod.new nil, nil
272
+
273
+ m.call_seq = "yields(name)\nyields(name, description)"
274
+
275
+ assert_equal 'yields', m.name
276
+ end
277
+
278
+ def test_name_call_seq_dot
279
+ m = RDoc::AnyMethod.new nil, nil
280
+
281
+ m.call_seq = "obj.yields(name)\nobj.yields(name, description)"
282
+
283
+ assert_equal 'yields', m.name
284
+ end
285
+
183
286
  def test_param_list_block_params
184
287
  m = RDoc::AnyMethod.new nil, 'method'
185
288
  m.parent = @c1
@@ -2,13 +2,6 @@ require File.expand_path '../xref_test_case', __FILE__
2
2
 
3
3
  class TestRDocClassModule < XrefTestCase
4
4
 
5
- def mu_pp obj
6
- s = ''
7
- s = PP.pp obj, s
8
- s.force_encoding Encoding.default_external if defined? Encoding
9
- s.chomp
10
- end
11
-
12
5
  def test_add_comment
13
6
  tl1 = @store.add_file 'one.rb'
14
7
  tl2 = @store.add_file 'two.rb'
@@ -108,23 +101,23 @@ class TestRDocClassModule < XrefTestCase
108
101
  def test_documented_eh
109
102
  cm = RDoc::ClassModule.new 'C'
110
103
 
111
- refute cm.documented?
104
+ refute cm.documented?, 'no comments, no markers'
112
105
 
113
- cm.add_comment 'hi', @top_level
106
+ cm.add_comment '', @top_level
114
107
 
115
- assert cm.documented?
108
+ refute cm.documented?, 'empty comment'
116
109
 
117
- cm.comment.replace ''
110
+ cm.add_comment 'hi', @top_level
118
111
 
119
- assert cm.documented?
112
+ assert cm.documented?, 'commented'
120
113
 
121
114
  cm.comment_location.clear
122
115
 
123
- refute cm.documented?
116
+ refute cm.documented?, 'no comment'
124
117
 
125
118
  cm.document_self = nil # notify :nodoc:
126
119
 
127
- assert cm.documented?
120
+ assert cm.documented?, ':nodoc:'
128
121
  end
129
122
 
130
123
  def test_each_ancestor
@@ -289,6 +282,7 @@ class TestRDocClassModule < XrefTestCase
289
282
  assert_empty loaded.extends
290
283
  assert_empty loaded.method_list
291
284
  end
285
+
292
286
  def test_marshal_load_version_0
293
287
  tl = @store.add_file 'file.rb'
294
288
  ns = tl.add_module RDoc::NormalModule, 'Namespace'
@@ -1454,7 +1448,7 @@ class TestRDocClassModule < XrefTestCase
1454
1448
 
1455
1449
  @c1.update_extends
1456
1450
 
1457
- assert_equal [a, c], @c1.extends
1451
+ assert_equal [a, b, c], @c1.extends
1458
1452
  end
1459
1453
 
1460
1454
  def test_update_extends_trim
@@ -100,24 +100,56 @@ class TestRDocCodeObject < XrefTestCase
100
100
  refute @co.display?
101
101
  end
102
102
 
103
+ def test_display_eh_suppress
104
+ assert @co.display?
105
+
106
+ @co.suppress
107
+
108
+ refute @co.display?
109
+
110
+ @co.comment = comment('hi')
111
+
112
+ refute @co.display?
113
+
114
+ @co.done_documenting = false
115
+
116
+ assert @co.display?
117
+
118
+ @co.ignore
119
+ @co.done_documenting = false
120
+
121
+ refute @co.display?
122
+ end
123
+
103
124
  def test_document_children_equals
104
125
  @co.document_children = false
126
+
105
127
  refute @co.document_children
106
128
 
107
- # TODO this is not true anymore:
108
- # test all the nodoc stuff etc...
109
- #@c2.document_children = false
110
- #assert_empty @c2.classes
129
+ @store.rdoc.options.visibility = :nodoc
130
+
131
+ @co.store = @store
132
+
133
+ assert @co.document_children
134
+
135
+ @co.document_children = false
136
+
137
+ assert @co.document_children
111
138
  end
112
139
 
113
140
  def test_document_self_equals
114
141
  @co.document_self = false
115
142
  refute @co.document_self
116
143
 
117
- # TODO this is not true anymore:
118
- # test all the nodoc stuff etc...
119
- #@c1.document_self = false
120
- #assert_empty @c1.method_list
144
+ @store.rdoc.options.visibility = :nodoc
145
+
146
+ @co.store = @store
147
+
148
+ assert @co.document_self
149
+
150
+ @co.document_self = false
151
+
152
+ assert @co.document_self
121
153
  end
122
154
 
123
155
  def test_documented_eh
@@ -159,6 +191,18 @@ class TestRDocCodeObject < XrefTestCase
159
191
  @co.done_documenting = false
160
192
  assert @co.document_self
161
193
  assert @co.document_children
194
+
195
+ @co.done_documenting = true
196
+
197
+ @store.rdoc.options.visibility = :nodoc
198
+
199
+ @co.store = @store
200
+
201
+ refute @co.done_documenting
202
+
203
+ @co.done_documenting = true
204
+
205
+ refute @co.done_documenting
162
206
  end
163
207
 
164
208
  def test_each_parent
@@ -195,6 +239,18 @@ class TestRDocCodeObject < XrefTestCase
195
239
  refute @co.document_self
196
240
  refute @co.document_children
197
241
  assert @co.ignored?
242
+
243
+ @store.rdoc.options.visibility = :nodoc
244
+
245
+ @co.store = @store
246
+
247
+ assert @co.document_self
248
+ assert @co.document_children
249
+ refute @co.ignored?
250
+
251
+ @co.ignore
252
+
253
+ refute @co.ignored?
198
254
  end
199
255
 
200
256
  def test_ignore_eh
@@ -271,6 +327,13 @@ class TestRDocCodeObject < XrefTestCase
271
327
  refute @co.ignored?
272
328
  end
273
329
 
330
+ def test_record_location_suppressed
331
+ @co.suppress
332
+ @co.record_location @xref_data
333
+
334
+ refute @co.suppressed?
335
+ end
336
+
274
337
  def test_section
275
338
  parent = RDoc::Context.new
276
339
  section = parent.sections.first
@@ -311,6 +374,30 @@ class TestRDocCodeObject < XrefTestCase
311
374
  refute @co.ignored?
312
375
  end
313
376
 
377
+ def test_start_doc_suppressed
378
+ @co.suppress
379
+
380
+ @co.start_doc
381
+
382
+ assert @co.document_self
383
+ assert @co.document_children
384
+ refute @co.suppressed?
385
+ end
386
+
387
+ def test_store_equals
388
+ @co.document_self = false
389
+
390
+ @co.store = @store
391
+
392
+ refute @co.document_self
393
+
394
+ @store.rdoc.options.visibility = :nodoc
395
+
396
+ @co.store = @store
397
+
398
+ assert @co.document_self
399
+ end
400
+
314
401
  def test_stop_doc
315
402
  @co.document_self = true
316
403
  @co.document_children = true
@@ -319,6 +406,44 @@ class TestRDocCodeObject < XrefTestCase
319
406
 
320
407
  refute @co.document_self
321
408
  refute @co.document_children
409
+
410
+ @store.rdoc.options.visibility = :nodoc
411
+
412
+ @co.store = @store
413
+
414
+ assert @co.document_self
415
+ assert @co.document_children
416
+
417
+ @co.stop_doc
418
+
419
+ assert @co.document_self
420
+ assert @co.document_children
421
+ end
422
+
423
+ def test_suppress
424
+ @co.suppress
425
+
426
+ refute @co.document_self
427
+ refute @co.document_children
428
+ assert @co.suppressed?
429
+
430
+ @store.rdoc.options.visibility = :nodoc
431
+
432
+ @co.store = @store
433
+
434
+ refute @co.suppressed?
435
+
436
+ @co.suppress
437
+
438
+ refute @co.suppressed?
439
+ end
440
+
441
+ def test_suppress_eh
442
+ refute @co.suppressed?
443
+
444
+ @co.suppress
445
+
446
+ assert @co.suppressed?
322
447
  end
323
448
 
324
449
  end
@@ -41,6 +41,14 @@ class TestRDocContext < XrefTestCase
41
41
  assert_equal [as], @context.unmatched_alias_lists['#old_name']
42
42
  end
43
43
 
44
+ def test_add
45
+ @context.add RDoc::Extend, 'Ext', 'comment'
46
+ @context.add RDoc::Include, 'Incl', 'comment'
47
+
48
+ refute_empty @context.extends
49
+ refute_empty @context.includes
50
+ end
51
+
44
52
  def test_add_alias_method_attr
45
53
  top_level = @store.add_file 'file.rb'
46
54
 
@@ -691,6 +699,15 @@ class TestRDocContext < XrefTestCase
691
699
  assert_equal [@apub, @aprot, @apriv], @vis.attributes
692
700
  end
693
701
 
702
+ def test_remove_invisible_nodoc
703
+ util_visibilities
704
+
705
+ @vis.remove_invisible :nodoc
706
+
707
+ assert_equal [@pub, @prot, @priv], @vis.method_list
708
+ assert_equal [@apub, @aprot, @apriv], @vis.attributes
709
+ end
710
+
694
711
  def test_remove_invisible_protected
695
712
  util_visibilities
696
713
 
@@ -13,13 +13,6 @@ class TestRDocContextSection < RDoc::TestCase
13
13
  @s = @S.new @klass, 'section', comment('# comment', @top_level)
14
14
  end
15
15
 
16
- def mu_pp obj
17
- s = ''
18
- s = PP.pp obj, s
19
- s.force_encoding Encoding.default_external if defined? Encoding
20
- s.chomp
21
- end
22
-
23
16
  def test_add_comment
24
17
  file1 = @store.add_file 'file1.rb'
25
18