From 00f5b4b54614d28941fd31f93eaf36357bd8c099 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 11 May 2021 16:31:18 +0900 Subject: [PATCH] [rubygems/rubygems] Don't use Minitest::Mock https://github.com/rubygems/rubygems/commit/d3fa893597 --- test/rubygems/test_gem_commands_open_command.rb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/test/rubygems/test_gem_commands_open_command.rb b/test/rubygems/test_gem_commands_open_command.rb index d33a14ed14..2c32b810cc 100644 --- a/test/rubygems/test_gem_commands_open_command.rb +++ b/test/rubygems/test_gem_commands_open_command.rb @@ -25,16 +25,15 @@ class TestGemCommandsOpenCommand < Gem::TestCase gem 'foo', '1.0.0' spec = gem 'foo', '1.0.1' - mock = Minitest::Mock.new - mock.expect(:call, true, [spec.full_gem_path]) - Dir.stub(:chdir, mock) do - use_ui @ui do - @cmd.execute + assert_nothing_raised Gem::MockGemUi::TermError do + Dir.stub(:chdir, spec.full_gem_path) do + use_ui @ui do + @cmd.execute + end end end - assert mock.verify assert_equal "", @ui.error end