diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-11-16 20:19:13 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-11-16 20:19:13 +0900 |
commit | f3bda8987ecf78aa260e697232876b35f83b67c3 (patch) | |
tree | 4031690093d2cb9ca6f0b25e723771bacf76e872 /spec/bundler/commands/exec_spec.rb | |
parent | 84fdaaab4605020103c77df7665556de0a02dad2 (diff) |
Merge the master branch of rubygems repo
Picked from https://github.com/rubygems/rubygems/commit/4b498709a015a94e14a3852a1841a7a3e669133d
Diffstat (limited to 'spec/bundler/commands/exec_spec.rb')
-rw-r--r-- | spec/bundler/commands/exec_spec.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/bundler/commands/exec_spec.rb b/spec/bundler/commands/exec_spec.rb index c6648f0a7a..2c4c33f374 100644 --- a/spec/bundler/commands/exec_spec.rb +++ b/spec/bundler/commands/exec_spec.rb @@ -612,6 +612,36 @@ RSpec.describe "bundle exec" do expect(out).to include("Installing foo 1.0") end + it "loads the correct optparse when `auto_install` is set, and optparse is a dependency" do + if Gem.ruby_version >= Gem::Version.new("3.0.0") && Gem.rubygems_version < Gem::Version.new("3.3.0.a") + skip "optparse is a default gem, and rubygems loads install during install" + end + + build_repo4 do + build_gem "fastlane", "2.192.0" do |s| + s.executables = "fastlane" + s.add_dependency "optparse", "~> 0.1.1" + end + + build_gem "optparse", "0.1.0" + build_gem "optparse", "0.1.1" + end + + system_gems "optparse-0.1.0", :gem_repo => gem_repo4 + + bundle "config set auto_install 1" + bundle "config set --local path vendor/bundle" + + gemfile <<~G + source "#{file_uri_for(gem_repo4)}" + gem "fastlane" + G + + bundle "exec fastlane" + expect(out).to include("Installing optparse 0.1.1") + expect(out).to include("2.192.0") + end + describe "with gems bundled via :path with invalid gemspecs" do it "outputs the gemspec validation errors" do build_lib "foo" |