diff --git a/lib/rdoc/rubygems_hook.rb b/lib/rdoc/rubygems_hook.rb index 87ce470af1..5335fa45f6 100644 --- a/lib/rdoc/rubygems_hook.rb +++ b/lib/rdoc/rubygems_hook.rb @@ -181,10 +181,10 @@ def generate options = ::RDoc::Options.new options.default_title = "#{@spec.full_name} Documentation" options.parse args + options.quiet = !Gem.configuration.really_verbose + options.finish end - options.quiet = !Gem.configuration.really_verbose - @rdoc = new_rdoc @rdoc.options = options diff --git a/test/rdoc/test_rdoc_rubygems_hook.rb b/test/rdoc/test_rdoc_rubygems_hook.rb index c2836ce805..b16f8e3385 100644 --- a/test/rdoc/test_rdoc_rubygems_hook.rb +++ b/test/rdoc/test_rdoc_rubygems_hook.rb @@ -37,8 +37,15 @@ def setup @a.loaded_from = File.join(@tempdir, 'a-2', 'a-2.gemspec') FileUtils.mkdir_p File.join(@tempdir, 'a-2', 'lib') - FileUtils.touch File.join(@tempdir, 'a-2', 'lib', 'a.rb') FileUtils.touch File.join(@tempdir, 'a-2', 'README') + File.open(File.join(@tempdir, 'a-2', 'lib', 'a.rb'), 'w') do |f| + f.puts '# comment' + f.puts '# :include: include.txt' + f.puts 'class A; end' + end + File.open(File.join(@tempdir, 'a-2', 'include.txt'), 'w') do |f| + f.puts 'included content' + end @hook = RDoc::RubyGemsHook.new @a @@ -112,6 +119,10 @@ def test_generate assert_equal %w[README lib], rdoc.options.files.sort assert_equal 'MyTitle', rdoc.store.main + + klass = rdoc.store.find_class_named('A') + refute_nil klass + assert_includes klass.comment.text, 'included content' end def test_generate_all