1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[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
parent 3456335a9c
commit 00f5b4b546
Notes: git 2021-05-12 17:25:18 +09:00

View file

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