mirror of
https://github.com/ruby/ruby.git
synced 2025-09-21 11:33:58 +02:00
Merge pull request #5482 from hsbt/rubygems-3-3-bundler-2-3
Merge RubyGems 3.3.x and Bundler 2.3.x
This commit is contained in:
parent
69463805f0
commit
6794f8cf92
115 changed files with 1701 additions and 889 deletions
|
@ -106,6 +106,31 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
|
|||
assert_empty out
|
||||
end
|
||||
|
||||
def test_execute_system_when_latest_does_not_support_your_ruby
|
||||
spec_fetcher do |fetcher|
|
||||
fetcher.download 'rubygems-update', 9 do |s|
|
||||
s.files = %w[setup.rb]
|
||||
s.required_ruby_version = '> 9'
|
||||
end
|
||||
end
|
||||
|
||||
@cmd.options[:args] = []
|
||||
@cmd.options[:system] = true
|
||||
|
||||
use_ui @ui do
|
||||
@cmd.execute
|
||||
end
|
||||
|
||||
out = @ui.output.split "\n"
|
||||
assert_equal "Updating rubygems-update", out.shift
|
||||
assert_empty out
|
||||
|
||||
err = @ui.error.split "\n"
|
||||
assert_equal "ERROR: Error installing rubygems-update:", err.shift
|
||||
assert_equal "\trubygems-update-9 requires Ruby version > 9. The current ruby version is #{Gem.ruby_version}.", err.shift
|
||||
assert_empty err
|
||||
end
|
||||
|
||||
def test_execute_system_multiple
|
||||
spec_fetcher do |fetcher|
|
||||
fetcher.download 'rubygems-update', 8 do |s|
|
||||
|
@ -132,6 +157,40 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
|
|||
assert_empty out
|
||||
end
|
||||
|
||||
def test_execute_system_update_installed
|
||||
spec_fetcher do |fetcher|
|
||||
fetcher.download 'rubygems-update', 8 do |s|
|
||||
s.files = %w[setup.rb]
|
||||
end
|
||||
end
|
||||
|
||||
@cmd.options[:args] = []
|
||||
@cmd.options[:system] = true
|
||||
|
||||
@cmd.execute
|
||||
|
||||
spec_fetcher do |fetcher|
|
||||
fetcher.download 'rubygems-update', 9 do |s|
|
||||
s.files = %w[setup.rb]
|
||||
end
|
||||
end
|
||||
|
||||
@cmd = Gem::Commands::UpdateCommand.new
|
||||
@cmd.options[:args] = []
|
||||
@cmd.options[:system] = true
|
||||
|
||||
use_ui @ui do
|
||||
@cmd.execute
|
||||
end
|
||||
|
||||
out = @ui.output.split "\n"
|
||||
assert_equal "Updating rubygems-update", out.shift
|
||||
assert_equal "Installing RubyGems 9", out.shift
|
||||
assert_equal "RubyGems system software updated", out.shift
|
||||
|
||||
assert_empty out
|
||||
end
|
||||
|
||||
def test_execute_system_specific
|
||||
spec_fetcher do |fetcher|
|
||||
fetcher.download 'rubygems-update', 8 do |s|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue