Skip to content

Commit 2662e45

Browse files
Add a spec to cover what vendoring timeout fixes
1 parent bdb78d8 commit 2662e45

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

bundler/spec/runtime/inline_spec.rb

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,4 +615,29 @@ def confirm(msg, newline = nil)
615615

616616
expect(err).to eq("The Gemfile specifies no dependencies")
617617
end
618+
619+
it "does not load default timeout" do
620+
default_timeout_version = ruby "gem 'timeout', '< 999999'; require 'timeout'; puts Timeout::VERSION", raise_on_error: false
621+
skip "timeout isn't a default gem" if default_timeout_version.empty?
622+
623+
# This only works on RubyGems 3.5.0 or higher
624+
ruby "require 'rubygems/timeout'", raise_on_error: false
625+
skip "rubygems under test does not yet vendor timeout" unless last_command.success?
626+
627+
build_repo4 do
628+
build_gem "timeout", "999"
629+
end
630+
631+
script <<-RUBY
632+
require "bundler/inline"
633+
634+
gemfile(true) do
635+
source "#{file_uri_for(gem_repo4)}"
636+
637+
gem "timeout"
638+
end
639+
RUBY
640+
641+
expect(out).to include("Installing timeout 999")
642+
end
618643
end

0 commit comments

Comments
 (0)