[rubygems/rubygems] Don't use Minitest::Mock

https://github.com/rubygems/rubygems/commit/d3fa893597
This commit is contained in:
Hiroshi SHIBATA 2021-05-11 16:31:18 +09:00
Родитель 3456335a9c
Коммит 00f5b4b546
1 изменённых файлов: 5 добавлений и 6 удалений

Просмотреть файл

@ -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