Skip to content

Commit 208af01

Browse files
committed
Test #fully_documented?
1 parent 9ac3627 commit 208af01

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

test/test_rdoc_context.rb

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,36 @@ def test_find_symbol_method
317317
assert_equal @c1__m, @c1.find_symbol('::m')
318318
end
319319

320+
def test_fully_documented_eh
321+
context = RDoc::Context.new
322+
323+
refute context.fully_documented?
324+
325+
context.comment = 'hi'
326+
327+
assert context.fully_documented?
328+
329+
m = @c1_m
330+
331+
context.add_method m
332+
333+
refute context.fully_documented?
334+
335+
m.comment = 'hi'
336+
337+
assert context.fully_documented?
338+
339+
c = RDoc::Constant.new 'C', '0', nil
340+
341+
context.add_constant c
342+
343+
refute context.fully_documented?
344+
345+
c.comment = 'hi'
346+
347+
assert context.fully_documented?
348+
end
349+
320350
def test_spaceship
321351
assert_equal(-1, @c2.<=>(@c3))
322352
assert_equal 0, @c2.<=>(@c2)

0 commit comments

Comments
 (0)