diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2023-12-12 17:13:47 +0100 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-12-13 12:16:55 +0900 |
commit | 844759ccdbf9400796259888d613597585ad697a (patch) | |
tree | fcd7a67b70a6d6b67eb98cd5ff9bf6c2e456366c /spec/bundler/runtime | |
parent | 5323935f5799772cf5d18e4e5a2dcce914b4c6bd (diff) |
[rubygems/rubygems] Add a spec to cover what vendoring timeout fixes
https://github.com/rubygems/rubygems/commit/2662e45d75
Diffstat (limited to 'spec/bundler/runtime')
-rw-r--r-- | spec/bundler/runtime/inline_spec.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/bundler/runtime/inline_spec.rb b/spec/bundler/runtime/inline_spec.rb index 7812912f45..22831fc354 100644 --- a/spec/bundler/runtime/inline_spec.rb +++ b/spec/bundler/runtime/inline_spec.rb @@ -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 |