summaryrefslogtreecommitdiff
path: root/test/rdoc/test_rdoc_rubygems_hook.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2021-06-18 13:13:27 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-06-23 11:05:14 +0900
commitf2e39e5fed498b51ae914ed42ec51ae578330583 (patch)
tree2fc34eda080a57e7a21147fcc0c5c79b90407fa2 /test/rdoc/test_rdoc_rubygems_hook.rb
parentc483aa8394fc26e341666db66938b1d6fc2cbb8e (diff)
[ruby/rdoc] Update test/rdoc/test_rdoc_rubygems_hook.rb
https://github.com/ruby/rdoc/commit/fb264c4cc4 Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Diffstat (limited to 'test/rdoc/test_rdoc_rubygems_hook.rb')
-rw-r--r--test/rdoc/test_rdoc_rubygems_hook.rb4
1 files changed, 4 insertions, 0 deletions
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