Skip to content

Commit

Permalink
[rubygems/rubygems] Add a spec to cover what vendoring timeout fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez authored and hsbt committed Dec 13, 2023
1 parent 5323935 commit 844759c
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions spec/bundler/runtime/inline_spec.rb
Expand Up @@ -615,4 +615,29 @@ def confirm(msg, newline = nil)

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

0 comments on commit 844759c

Please sign in to comment.