From e97741e12a22d78825a3a9dfcb7382adb0e27855 Mon Sep 17 00:00:00 2001 From: hsbt Date: Fri, 4 Jan 2019 13:10:58 +0000 Subject: Merge Bundler 2.0.1 from upstream. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- spec/bundler/install/binstubs_spec.rb | 4 ++-- spec/bundler/install/deploy_spec.rb | 10 +++++----- spec/bundler/install/gemfile/gemspec_spec.rb | 4 ++-- spec/bundler/install/gemfile/git_spec.rb | 2 +- spec/bundler/install/gemfile/groups_spec.rb | 6 +++--- spec/bundler/install/gemfile/path_spec.rb | 2 +- spec/bundler/install/gemfile/platform_spec.rb | 2 +- spec/bundler/install/gemfile/sources_spec.rb | 8 ++++---- spec/bundler/install/gems/compact_index_spec.rb | 16 ++++++++-------- spec/bundler/install/gems/dependency_api_spec.rb | 16 ++++++++-------- spec/bundler/install/gems/flex_spec.rb | 4 ++-- spec/bundler/install/gems/standalone_spec.rb | 6 +++--- spec/bundler/install/git_spec.rb | 4 ++-- spec/bundler/install/path_spec.rb | 12 ++++++------ spec/bundler/install/post_bundle_message_spec.rb | 6 +++--- spec/bundler/install/redownload_spec.rb | 6 +++--- 16 files changed, 54 insertions(+), 54 deletions(-) (limited to 'spec/bundler/install') diff --git a/spec/bundler/install/binstubs_spec.rb b/spec/bundler/install/binstubs_spec.rb index 23eb691ab8..f04d3fe654 100644 --- a/spec/bundler/install/binstubs_spec.rb +++ b/spec/bundler/install/binstubs_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe "bundle install", :bundler => "< 2" do +RSpec.describe "bundle install", :bundler => "< 3" do describe "when system_bindir is set" do # On OS X, Gem.bindir defaults to /usr/bin, so system_bindir is useful if # you want to avoid sudo installs for system gems with OS X's default ruby @@ -20,7 +20,7 @@ RSpec.describe "bundle install", :bundler => "< 2" do end end - describe "when multiple gems contain the same exe", :bundler => "< 2" do + describe "when multiple gems contain the same exe", :bundler => "< 3" do before do build_repo2 do build_gem "fake", "14" do |s| diff --git a/spec/bundler/install/deploy_spec.rb b/spec/bundler/install/deploy_spec.rb index 3b9d68982a..ec72ff69fc 100644 --- a/spec/bundler/install/deploy_spec.rb +++ b/spec/bundler/install/deploy_spec.rb @@ -8,7 +8,7 @@ RSpec.describe "install with --deployment or --frozen" do G end - context "with CLI flags", :bundler => "< 2" do + context "with CLI flags", :bundler => "< 3" do it "fails without a lockfile and says that --deployment requires a lock" do bundle "install --deployment" expect(out).to include("The --deployment flag requires a Gemfile.lock") @@ -109,11 +109,11 @@ RSpec.describe "install with --deployment or --frozen" do bundle "install" end - it "works with the --deployment flag if you didn't change anything", :bundler => "< 2" do + it "works with the --deployment flag if you didn't change anything", :bundler => "< 3" do bundle! "install --deployment" end - it "works with the --frozen flag if you didn't change anything", :bundler => "< 2" do + it "works with the --frozen flag if you didn't change anything", :bundler => "< 3" do bundle! "install --frozen" end @@ -165,7 +165,7 @@ RSpec.describe "install with --deployment or --frozen" do expect(out).to include("The path `#{lib_path("path_gem-1.0")}` does not exist.") end - it "can have --frozen set via an environment variable", :bundler => "< 2" do + it "can have --frozen set via an environment variable", :bundler => "< 3" do gemfile <<-G source "file://#{gem_repo1}" gem "rack" @@ -297,7 +297,7 @@ RSpec.describe "install with --deployment or --frozen" do context "when replacing a host with the same host with credentials" do let(:success_message) do - if Bundler::VERSION.split(".", 2).first == "1" + if Bundler.bundler_major_version < 3 "Could not reach host localgemserver.test" else "Bundle complete!" diff --git a/spec/bundler/install/gemfile/gemspec_spec.rb b/spec/bundler/install/gemfile/gemspec_spec.rb index 7ce037730e..bbb56da5a4 100644 --- a/spec/bundler/install/gemfile/gemspec_spec.rb +++ b/spec/bundler/install/gemfile/gemspec_spec.rb @@ -433,7 +433,7 @@ RSpec.describe "bundle install from an existing gemspec" do end end - context "on ruby", :bundler => "< 2" do + context "on ruby", :bundler => "< 3" do before do simulate_platform("ruby") bundle :install @@ -534,7 +534,7 @@ RSpec.describe "bundle install from an existing gemspec" do end end - context "on ruby", :bundler => "2" do + context "on ruby", :bundler => "3" do before do simulate_platform("ruby") bundle :install diff --git a/spec/bundler/install/gemfile/git_spec.rb b/spec/bundler/install/gemfile/git_spec.rb index 57d83a5295..fe396c7a0f 100644 --- a/spec/bundler/install/gemfile/git_spec.rb +++ b/spec/bundler/install/gemfile/git_spec.rb @@ -26,7 +26,7 @@ RSpec.describe "bundle install with git sources" do expect(out).to eq("WIN") end - it "caches the git repo", :bundler => "< 2" do + it "caches the git repo", :bundler => "< 3" do expect(Dir["#{default_bundle_path}/cache/bundler/git/foo-1.0-*"]).to have_attributes :size => 1 end diff --git a/spec/bundler/install/gemfile/groups_spec.rb b/spec/bundler/install/gemfile/groups_spec.rb index 19c379e188..45395e606f 100644 --- a/spec/bundler/install/gemfile/groups_spec.rb +++ b/spec/bundler/install/gemfile/groups_spec.rb @@ -192,19 +192,19 @@ RSpec.describe "bundle install with groups" do expect(the_bundle).not_to include_gems "thin 1.0" end - it "does remove groups from without when passed at --with", :bundler => "< 2" do + it "does remove groups from without when passed at --with", :bundler => "< 3" do bundle :install, forgotten_command_line_options(:without => "emo") bundle :install, forgotten_command_line_options(:with => "emo") expect(the_bundle).to include_gems "activesupport 2.3.5" end - it "does remove groups from with when passed at --without", :bundler => "< 2" do + it "does remove groups from with when passed at --without", :bundler => "< 3" do bundle :install, forgotten_command_line_options(:with => "debugging") bundle :install, forgotten_command_line_options(:without => "debugging") expect(the_bundle).not_to include_gem "thin 1.0" end - it "errors out when passing a group to with and without via CLI flags", :bundler => "< 2" do + it "errors out when passing a group to with and without via CLI flags", :bundler => "< 3" do bundle :install, forgotten_command_line_options(:with => "emo debugging", :without => "emo") expect(last_command).to be_failure expect(out).to include("The offending groups are: emo") diff --git a/spec/bundler/install/gemfile/path_spec.rb b/spec/bundler/install/gemfile/path_spec.rb index f7789e7ea5..a508c971ad 100644 --- a/spec/bundler/install/gemfile/path_spec.rb +++ b/spec/bundler/install/gemfile/path_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true RSpec.describe "bundle install with explicit source paths" do - it "fetches gems with a global path source", :bundler => "< 2" do + it "fetches gems with a global path source", :bundler => "< 3" do build_lib "foo" install_gemfile <<-G diff --git a/spec/bundler/install/gemfile/platform_spec.rb b/spec/bundler/install/gemfile/platform_spec.rb index bfdf9b68c8..b5dbc41a33 100644 --- a/spec/bundler/install/gemfile/platform_spec.rb +++ b/spec/bundler/install/gemfile/platform_spec.rb @@ -230,7 +230,7 @@ RSpec.describe "bundle install across platforms" do expect(the_bundle).to include_gems "nokogiri 1.4.2 JAVA", "weakling 0.0.3" end - it "works with gems that have extra platform-specific runtime dependencies", :bundler => "< 2" do + it "works with gems that have extra platform-specific runtime dependencies", :bundler => "< 3" do simulate_platform x64_mac update_repo2 do diff --git a/spec/bundler/install/gemfile/sources_spec.rb b/spec/bundler/install/gemfile/sources_spec.rb index c814d0de76..efe6ccce7f 100644 --- a/spec/bundler/install/gemfile/sources_spec.rb +++ b/spec/bundler/install/gemfile/sources_spec.rb @@ -28,7 +28,7 @@ RSpec.describe "bundle install with gems on multiple sources" do bundle "config major_deprecations true" end - it "warns about ambiguous gems, but installs anyway, prioritizing sources last to first", :bundler => "< 2" do + it "warns about ambiguous gems, but installs anyway, prioritizing sources last to first", :bundler => "< 3" do bundle :install expect(out).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.") @@ -58,7 +58,7 @@ RSpec.describe "bundle install with gems on multiple sources" do bundle "config major_deprecations true" end - it "warns about ambiguous gems, but installs anyway", :bundler => "< 2" do + it "warns about ambiguous gems, but installs anyway", :bundler => "< 3" do bundle :install expect(out).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.") @@ -248,7 +248,7 @@ RSpec.describe "bundle install with gems on multiple sources" do G end - it "installs from the other source and warns about ambiguous gems", :bundler => "< 2" do + it "installs from the other source and warns about ambiguous gems", :bundler => "< 3" do bundle "config major_deprecations true" bundle :install expect(out).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.") @@ -276,7 +276,7 @@ RSpec.describe "bundle install with gems on multiple sources" do G end - it "installs the dependency from the pinned source without warning", :bundler => "< 2" do + it "installs the dependency from the pinned source without warning", :bundler => "< 3" do bundle :install expect(out).not_to include("Warning: the gem 'rack' was found in multiple sources.") diff --git a/spec/bundler/install/gems/compact_index_spec.rb b/spec/bundler/install/gems/compact_index_spec.rb index 02a37a77d5..2acade1166 100644 --- a/spec/bundler/install/gems/compact_index_spec.rb +++ b/spec/bundler/install/gems/compact_index_spec.rb @@ -269,7 +269,7 @@ The checksum of /versions does not match the checksum provided by the server! So expect(last_command.stdboth).not_to include "Double checking" end - it "fetches again when more dependencies are found in subsequent sources", :bundler => "< 2" do + it "fetches again when more dependencies are found in subsequent sources", :bundler => "< 3" do build_repo2 do build_gem "back_deps" do |s| s.add_dependency "foo" @@ -328,7 +328,7 @@ The checksum of /versions does not match the checksum provided by the server! So expect(the_bundle).to include_gems "rack 1.2" end - it "considers all possible versions of dependencies from all api gem sources", :bundler => "< 2" do + it "considers all possible versions of dependencies from all api gem sources", :bundler => "< 3" do # In this scenario, the gem "somegem" only exists in repo4. It depends on specific version of activesupport that # exists only in repo1. There happens also be a version of activesupport in repo4, but not the one that version 1.0.0 # of somegem wants. This test makes sure that bundler actually finds version 1.2.3 of active support in the other @@ -352,7 +352,7 @@ The checksum of /versions does not match the checksum provided by the server! So expect(the_bundle).to include_gems "activesupport 1.2.3" end - it "considers all possible versions of dependencies from all api gem sources when using blocks", :bundler => "< 2" do + it "considers all possible versions of dependencies from all api gem sources when using blocks", :bundler => "< 3" do # In this scenario, the gem "somegem" only exists in repo4. It depends on specific version of activesupport that # exists only in repo1. There happens also be a version of activesupport in repo4, but not the one that version 1.0.0 # of somegem wants. This test makes sure that bundler actually finds version 1.2.3 of active support in the other @@ -458,7 +458,7 @@ The checksum of /versions does not match the checksum provided by the server! So expect(the_bundle).to include_gems "foo 1.0" end - it "fetches again when more dependencies are found in subsequent sources using --deployment", :bundler => "< 2" do + it "fetches again when more dependencies are found in subsequent sources using --deployment", :bundler => "< 3" do build_repo2 do build_gem "back_deps" do |s| s.add_dependency "foo" @@ -522,7 +522,7 @@ The checksum of /versions does not match the checksum provided by the server! So expect(the_bundle).to include_gems "rails 2.3.2" end - it "installs the binstubs", :bundler => "< 2" do + it "installs the binstubs", :bundler => "< 3" do gemfile <<-G source "#{source_uri}" gem "rack" @@ -534,7 +534,7 @@ The checksum of /versions does not match the checksum provided by the server! So expect(out).to eq("1.0.0") end - it "installs the bins when using --path and uses autoclean", :bundler => "< 2" do + it "installs the bins when using --path and uses autoclean", :bundler => "< 3" do gemfile <<-G source "#{source_uri}" gem "rack" @@ -545,7 +545,7 @@ The checksum of /versions does not match the checksum provided by the server! So expect(vendored_gems("bin/rackup")).to exist end - it "installs the bins when using --path and uses bundle clean", :bundler => "< 2" do + it "installs the bins when using --path and uses bundle clean", :bundler => "< 3" do gemfile <<-G source "#{source_uri}" gem "rack" @@ -620,7 +620,7 @@ The checksum of /versions does not match the checksum provided by the server! So expect(out).not_to include("#{user}:#{password}") end - it "strips http basic auth creds when warning about ambiguous sources", :bundler => "< 2" do + it "strips http basic auth creds when warning about ambiguous sources", :bundler => "< 3" do gemfile <<-G source "#{basic_auth_source_uri}" source "file://#{gem_repo1}" diff --git a/spec/bundler/install/gems/dependency_api_spec.rb b/spec/bundler/install/gems/dependency_api_spec.rb index 2ffe4b62d7..3cb98db1eb 100644 --- a/spec/bundler/install/gems/dependency_api_spec.rb +++ b/spec/bundler/install/gems/dependency_api_spec.rb @@ -243,7 +243,7 @@ RSpec.describe "gemcutter's dependency API" do end end - it "fetches again when more dependencies are found in subsequent sources", :bundler => "< 2" do + it "fetches again when more dependencies are found in subsequent sources", :bundler => "< 3" do build_repo2 do build_gem "back_deps" do |s| s.add_dependency "foo" @@ -302,7 +302,7 @@ RSpec.describe "gemcutter's dependency API" do expect(the_bundle).to include_gems "rack 1.2" end - it "considers all possible versions of dependencies from all api gem sources", :bundler => "< 2" do + it "considers all possible versions of dependencies from all api gem sources", :bundler => "< 3" do # In this scenario, the gem "somegem" only exists in repo4. It depends on specific version of activesupport that # exists only in repo1. There happens also be a version of activesupport in repo4, but not the one that version 1.0.0 # of somegem wants. This test makes sure that bundler actually finds version 1.2.3 of active support in the other @@ -372,7 +372,7 @@ RSpec.describe "gemcutter's dependency API" do expect(out).to include("Fetching source index from http://localgemserver.test/extra") end - it "does not fetch every spec if the index of gems is large when doing back deps", :bundler => "< 2" do + it "does not fetch every spec if the index of gems is large when doing back deps", :bundler => "< 3" do build_repo2 do build_gem "back_deps" do |s| s.add_dependency "foo" @@ -432,7 +432,7 @@ RSpec.describe "gemcutter's dependency API" do expect(the_bundle).to include_gems "foo 1.0" end - it "fetches again when more dependencies are found in subsequent sources using --deployment", :bundler => "< 2" do + it "fetches again when more dependencies are found in subsequent sources using --deployment", :bundler => "< 3" do build_repo2 do build_gem "back_deps" do |s| s.add_dependency "foo" @@ -496,7 +496,7 @@ RSpec.describe "gemcutter's dependency API" do expect(the_bundle).to include_gems "rails 2.3.2" end - it "installs the binstubs", :bundler => "< 2" do + it "installs the binstubs", :bundler => "< 3" do gemfile <<-G source "#{source_uri}" gem "rack" @@ -508,7 +508,7 @@ RSpec.describe "gemcutter's dependency API" do expect(out).to eq("1.0.0") end - it "installs the bins when using --path and uses autoclean", :bundler => "< 2" do + it "installs the bins when using --path and uses autoclean", :bundler => "< 3" do gemfile <<-G source "#{source_uri}" gem "rack" @@ -519,7 +519,7 @@ RSpec.describe "gemcutter's dependency API" do expect(vendored_gems("bin/rackup")).to exist end - it "installs the bins when using --path and uses bundle clean", :bundler => "< 2" do + it "installs the bins when using --path and uses bundle clean", :bundler => "< 3" do gemfile <<-G source "#{source_uri}" gem "rack" @@ -594,7 +594,7 @@ RSpec.describe "gemcutter's dependency API" do expect(out).not_to include("#{user}:#{password}") end - it "strips http basic auth creds when warning about ambiguous sources", :bundler => "< 2" do + it "strips http basic auth creds when warning about ambiguous sources", :bundler => "< 3" do gemfile <<-G source "#{basic_auth_source_uri}" source "file://#{gem_repo1}" diff --git a/spec/bundler/install/gems/flex_spec.rb b/spec/bundler/install/gems/flex_spec.rb index 37d2e4958a..736f418ec7 100644 --- a/spec/bundler/install/gems/flex_spec.rb +++ b/spec/bundler/install/gems/flex_spec.rb @@ -244,7 +244,7 @@ RSpec.describe "bundle flex_install" do end describe "when adding a new source" do - it "updates the lockfile", :bundler => "< 2" do + it "updates the lockfile", :bundler => "< 3" do build_repo2 install_gemfile! <<-G source "file://localhost#{gem_repo1}" @@ -274,7 +274,7 @@ RSpec.describe "bundle flex_install" do L end - it "updates the lockfile", :bundler => "2" do + it "updates the lockfile", :bundler => "3" do build_repo2 install_gemfile! <<-G source "file://localhost#{gem_repo1}" diff --git a/spec/bundler/install/gems/standalone_spec.rb b/spec/bundler/install/gems/standalone_spec.rb index 10ce589eef..fa7a3bdc27 100644 --- a/spec/bundler/install/gems/standalone_spec.rb +++ b/spec/bundler/install/gems/standalone_spec.rb @@ -197,7 +197,7 @@ RSpec.shared_examples "bundle install --standalone" do expect(last_command.stderr).to eq("ZOMG LOAD ERROR") end - it "allows --path to change the location of the standalone bundle", :bundler => "< 2" do + it "allows --path to change the location of the standalone bundle", :bundler => "< 3" do bundle! "install", forgotten_command_line_options(:path => "path/to/bundle").merge(:standalone => true) Dir.chdir(bundled_app) do @@ -213,7 +213,7 @@ RSpec.shared_examples "bundle install --standalone" do expect(last_command.stdout).to eq("2.3.2") end - it "allows --path to change the location of the standalone bundle", :bundler => "2" do + it "allows --path to change the location of the standalone bundle", :bundler => "3" do bundle! "install", forgotten_command_line_options(:path => "path/to/bundle").merge(:standalone => true) path = File.expand_path("path/to/bundle") @@ -273,7 +273,7 @@ RSpec.shared_examples "bundle install --standalone" do end end - describe "with --binstubs", :bundler => "< 2" do + describe "with --binstubs", :bundler => "< 3" do before do gemfile <<-G source "file://#{gem_repo1}" diff --git a/spec/bundler/install/git_spec.rb b/spec/bundler/install/git_spec.rb index 6ae718c2a4..48086a86c7 100644 --- a/spec/bundler/install/git_spec.rb +++ b/spec/bundler/install/git_spec.rb @@ -2,7 +2,7 @@ RSpec.describe "bundle install" do context "git sources" do - it "displays the revision hash of the gem repository", :bundler => "< 2" do + it "displays the revision hash of the gem repository", :bundler => "< 3" do build_git "foo", "1.0", :path => lib_path("foo") install_gemfile <<-G @@ -14,7 +14,7 @@ RSpec.describe "bundle install" do expect(the_bundle).to include_gems "foo 1.0", :source => "git@#{lib_path("foo")}" end - it "displays the ref of the gem repository when using branch~num as a ref", :bundler => "< 2" do + it "displays the ref of the gem repository when using branch~num as a ref", :bundler => "< 3" do build_git "foo", "1.0", :path => lib_path("foo") rev = revision_for(lib_path("foo"))[0..6] update_git "foo", "2.0", :path => lib_path("foo"), :gemspec => true diff --git a/spec/bundler/install/path_spec.rb b/spec/bundler/install/path_spec.rb index 44439c275e..94f38c9290 100644 --- a/spec/bundler/install/path_spec.rb +++ b/spec/bundler/install/path_spec.rb @@ -13,7 +13,7 @@ RSpec.describe "bundle install" do G end - it "does not use available system gems with bundle --path vendor/bundle", :bundler => "< 2" do + it "does not use available system gems with bundle --path vendor/bundle", :bundler => "< 3" do bundle! :install, forgotten_command_line_options(:path => "vendor/bundle") expect(the_bundle).to include_gems "rack 1.0.0" end @@ -35,13 +35,13 @@ RSpec.describe "bundle install" do expect(out).to include("gems are installed into `./vendor/bundle`") end - it "disallows --path vendor/bundle --system", :bundler => "< 2" do + it "disallows --path vendor/bundle --system", :bundler => "< 3" do bundle "install --path vendor/bundle --system" expect(out).to include("Please choose only one option.") expect(exitstatus).to eq(15) if exitstatus end - it "remembers to disable system gems after the first time with bundle --path vendor/bundle", :bundler => "< 2" do + it "remembers to disable system gems after the first time with bundle --path vendor/bundle", :bundler => "< 3" do bundle "install --path vendor/bundle" FileUtils.rm_rf bundled_app("vendor") bundle "install" @@ -53,7 +53,7 @@ RSpec.describe "bundle install" do context "with path_relative_to_cwd set to true" do before { bundle! "config path_relative_to_cwd true" } - it "installs the bundle relatively to current working directory", :bundler => "< 2" do + it "installs the bundle relatively to current working directory", :bundler => "< 3" do Dir.chdir(bundled_app.parent) do bundle! "install --gemfile='#{bundled_app}/Gemfile' --path vendor/bundle" expect(out).to include("installed into `./vendor/bundle`") @@ -113,7 +113,7 @@ RSpec.describe "bundle install" do expect(the_bundle).to include_gems "rack 1.0.0" end - context "with global_path_appends_ruby_scope set", :bundler => "2" do + context "with global_path_appends_ruby_scope set", :bundler => "3" do it "installs gems to ." do set_bundle_path(type, ".") bundle! "config --global disable_shared_gems true" @@ -147,7 +147,7 @@ RSpec.describe "bundle install" do end end - context "with global_path_appends_ruby_scope unset", :bundler => "< 2" do + context "with global_path_appends_ruby_scope unset", :bundler => "< 3" do it "installs gems to ." do set_bundle_path(type, ".") bundle! "config --global disable_shared_gems true" diff --git a/spec/bundler/install/post_bundle_message_spec.rb b/spec/bundler/install/post_bundle_message_spec.rb index eadc8a4d85..394134f523 100644 --- a/spec/bundler/install/post_bundle_message_spec.rb +++ b/spec/bundler/install/post_bundle_message_spec.rb @@ -19,7 +19,7 @@ RSpec.describe "post bundle message" do let(:bundle_complete_message) { "Bundle complete!" } let(:bundle_updated_message) { "Bundle updated!" } let(:installed_gems_stats) { "4 Gemfile dependencies, 5 gems now installed." } - let(:bundle_show_message) { Bundler::VERSION.split(".").first.to_i < 2 ? bundle_show_system_message : bundle_show_path_message } + let(:bundle_show_message) { Bundler::VERSION.split(".").first.to_i < 3 ? bundle_show_system_message : bundle_show_path_message } describe "for fresh bundle install" do it "without any options" do @@ -101,7 +101,7 @@ RSpec.describe "post bundle message" do end describe "with misspelled or non-existent gem name" do - it "should report a helpful error message", :bundler => "< 2" do + it "should report a helpful error message", :bundler => "< 3" do install_gemfile <<-G source "file://localhost#{gem_repo1}" gem "rack" @@ -110,7 +110,7 @@ RSpec.describe "post bundle message" do expect(out).to include("Could not find gem 'not-a-gem' in any of the gem sources listed in your Gemfile.") end - it "should report a helpful error message", :bundler => "2" do + it "should report a helpful error message", :bundler => "3" do install_gemfile <<-G source "file://localhost#{gem_repo1}" gem "rack" diff --git a/spec/bundler/install/redownload_spec.rb b/spec/bundler/install/redownload_spec.rb index 665c64d49a..f9caeed58a 100644 --- a/spec/bundler/install/redownload_spec.rb +++ b/spec/bundler/install/redownload_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe "bundle install", :bundler => "< 2", :ruby => ">= 2.0" do +RSpec.describe "bundle install", :bundler => "< 3", :ruby => ">= 2.0" do before :each do gemfile <<-G source "file://#{gem_repo1}" @@ -65,12 +65,12 @@ RSpec.describe "bundle install", :bundler => "< 2", :ruby => ">= 2.0" do it "shows a deprecation when single flag passed" do bundle! "install --force" - expect(out).to include "[DEPRECATED FOR 2.0] The `--force` option has been renamed to `--redownload`" + expect(out).to include "[DEPRECATED FOR 3.0] The `--force` option has been renamed to `--redownload`" end it "shows a deprecation when multiple flags passed" do bundle! "install --no-color --force" - expect(out).to include "[DEPRECATED FOR 2.0] The `--force` option has been renamed to `--redownload`" + expect(out).to include "[DEPRECATED FOR 3.0] The `--force` option has been renamed to `--redownload`" end end -- cgit v1.2.3