summaryrefslogtreecommitdiff
path: root/test/rdoc
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-26 05:46:02 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-26 05:46:02 +0000
commite0dd7b4d3a41203d01f3b97e7b2001fb996f8175 (patch)
tree78fcd09538d47902a32474f9605f63c84aa1f357 /test/rdoc
parent03cde6c805bea904111311de87a1714aa902c5d3 (diff)
test/rdoc/test_rdoc_rdoc.rb: add dummy finish
RDoc::Options#@exclude is initialized as an empty array. Then, #finish converts it to a regexp or nil and reassign it to @exclude. Some methods of RDoc assumes that #finish has been already called. So, this change forces to assign nil to @exclude. This type confusion was found during work for removal of `Object#=~`. [Feature #15231] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rdoc')
-rw-r--r--test/rdoc/test_rdoc_rdoc.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/rdoc/test_rdoc_rdoc.rb b/test/rdoc/test_rdoc_rdoc.rb
index 4014ecfa54..97e98cffb7 100644
--- a/test/rdoc/test_rdoc_rdoc.rb
+++ b/test/rdoc/test_rdoc_rdoc.rb
@@ -69,6 +69,13 @@ class TestRDocRDoc < RDoc::TestCase
end
def test_gather_files
+ # TODO: dummy finish
+ # RDoc::Options#@exclude is initialized as an empty array.
+ # Then, #finish converts it to a regexp or nil and reassign it to @exclude.
+ # RDoc#gather_files assumes that #finish has been already called.
+ # So, it forces to assign nil to @exclude.
+ @rdoc.options.exclude = nil
+
a = File.expand_path __FILE__
b = File.expand_path '../test_rdoc_text.rb', __FILE__
@@ -182,6 +189,13 @@ class TestRDocRDoc < RDoc::TestCase
end
def test_normalized_file_list_with_dot_doc
+ # TODO: dummy finish
+ # RDoc::Options#@exclude is initialized as an empty array.
+ # Then, #finish converts it to a regexp or nil and reassign it to @exclude.
+ # RDoc#normalized_file_list assumes that #finish has been already called.
+ # So, it forces to assign nil to @exclude.
+ @rdoc.options.exclude = nil
+
expected_files = []
files = temp_dir do |dir|
a = File.expand_path('a.rb')