From f2e39e5fed498b51ae914ed42ec51ae578330583 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Fri, 18 Jun 2021 13:13:27 +0900 Subject: [PATCH] [ruby/rdoc] Update test/rdoc/test_rdoc_rubygems_hook.rb https://github.com/ruby/rdoc/commit/fb264c4cc4 Co-authored-by: Nobuyoshi Nakada --- test/rdoc/test_rdoc_rubygems_hook.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/rdoc/test_rdoc_rubygems_hook.rb b/test/rdoc/test_rdoc_rubygems_hook.rb index 4ab7ff014e..36794be5c9 100644 --- a/test/rdoc/test_rdoc_rubygems_hook.rb +++ b/test/rdoc/test_rdoc_rubygems_hook.rb @@ -21,6 +21,7 @@ class TestRDocRubygemsHook < Test::Unit::TestCase @a.instance_variable_set(:@doc_dir, File.join(@tempdir, "doc")) @a.instance_variable_set(:@gem_dir, File.join(@tempdir, "a-2")) @a.instance_variable_set(:@full_gem_path, File.join(@tempdir, "a-2")) + @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') @@ -33,9 +34,12 @@ class TestRDocRubygemsHook < Test::Unit::TestCase rescue Gem::DocumentError => e skip e.message end + @old_ui = Gem::DefaultUserInteraction.ui + Gem::DefaultUserInteraction.ui = Gem::SilentUI.new end def teardown + Gem::DefaultUserInteraction.ui = @old_ui FileUtils.rm_rf File.expand_path("tmp") end