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:
parent
3456335a9c
commit
00f5b4b546
Notes:
git
2021-05-12 17:25:18 +09:00
1 changed files with 5 additions and 6 deletions
|
@ -25,16 +25,15 @@ class TestGemCommandsOpenCommand < Gem::TestCase
|
||||||
|
|
||||||
gem 'foo', '1.0.0'
|
gem 'foo', '1.0.0'
|
||||||
spec = gem 'foo', '1.0.1'
|
spec = gem 'foo', '1.0.1'
|
||||||
mock = Minitest::Mock.new
|
|
||||||
mock.expect(:call, true, [spec.full_gem_path])
|
|
||||||
|
|
||||||
Dir.stub(:chdir, mock) do
|
assert_nothing_raised Gem::MockGemUi::TermError do
|
||||||
|
Dir.stub(:chdir, spec.full_gem_path) do
|
||||||
use_ui @ui do
|
use_ui @ui do
|
||||||
@cmd.execute
|
@cmd.execute
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
assert mock.verify
|
|
||||||
assert_equal "", @ui.error
|
assert_equal "", @ui.error
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue