[rubygems/rubygems] Add a spec to cover what vendoring timeout fixes

https://github.com/rubygems/rubygems/commit/2662e45d75
This commit is contained in:
David Rodríguez 2023-12-12 17:13:47 +01:00 коммит произвёл Hiroshi SHIBATA
Родитель 5323935f57
Коммит 844759ccdb
1 изменённых файлов: 25 добавлений и 0 удалений

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

@ -615,4 +615,29 @@ RSpec.describe "bundler/inline#gemfile" do
expect(err).to eq("The Gemfile specifies no dependencies")
end
it "does not load default timeout" do
default_timeout_version = ruby "gem 'timeout', '< 999999'; require 'timeout'; puts Timeout::VERSION", raise_on_error: false
skip "timeout isn't a default gem" if default_timeout_version.empty?
# This only works on RubyGems 3.5.0 or higher
ruby "require 'rubygems/timeout'", raise_on_error: false
skip "rubygems under test does not yet vendor timeout" unless last_command.success?
build_repo4 do
build_gem "timeout", "999"
end
script <<-RUBY
require "bundler/inline"
gemfile(true) do
source "#{file_uri_for(gem_repo4)}"
gem "timeout"
end
RUBY
expect(out).to include("Installing timeout 999")
end
end