summaryrefslogtreecommitdiff
path: root/spec/install
diff options
context:
space:
mode:
Diffstat (limited to 'spec/install')
-rw-r--r--spec/install/binstubs_spec.rb4
-rw-r--r--spec/install/deploy_spec.rb53
-rw-r--r--spec/install/gemfile/git_spec.rb2
-rw-r--r--spec/install/gemfile/groups_spec.rb8
-rw-r--r--spec/install/gemfile/path_spec.rb2
-rw-r--r--spec/install/gemfile/platform_spec.rb4
-rw-r--r--spec/install/gems/compact_index_spec.rb20
-rw-r--r--spec/install/gems/dependency_api_spec.rb20
-rw-r--r--spec/install/gems/standalone_spec.rb6
-rw-r--r--spec/install/git_spec.rb4
-rw-r--r--spec/install/path_spec.rb14
-rw-r--r--spec/install/post_bundle_message_spec.rb2
-rw-r--r--spec/install/redownload_spec.rb16
13 files changed, 63 insertions, 92 deletions
diff --git a/spec/install/binstubs_spec.rb b/spec/install/binstubs_spec.rb
index 23eb691ab8..f04d3fe654 100644
--- a/spec/install/binstubs_spec.rb
+++ b/spec/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/install/deploy_spec.rb b/spec/install/deploy_spec.rb
index 8995caa52b..918dbabfbe 100644
--- a/spec/install/deploy_spec.rb
+++ b/spec/install/deploy_spec.rb
@@ -8,29 +8,29 @@ 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")
+ expect(err).to include("The --deployment flag requires a Gemfile.lock")
end
it "fails without a lockfile and says that --frozen requires a lock" do
bundle "install --frozen"
- expect(out).to include("The --frozen flag requires a Gemfile.lock")
+ expect(err).to include("The --frozen flag requires a Gemfile.lock")
end
it "disallows --deployment --system" do
bundle "install --deployment --system"
- expect(out).to include("You have specified both --deployment")
- expect(out).to include("Please choose only one option")
+ expect(err).to include("You have specified both --deployment")
+ expect(err).to include("Please choose only one option")
expect(exitstatus).to eq(15) if exitstatus
end
it "disallows --deployment --path --system" do
bundle "install --deployment --path . --system"
- expect(out).to include("You have specified both --path")
- expect(out).to include("as well as --system")
- expect(out).to include("Please choose only one option")
+ expect(err).to include("You have specified both --path")
+ expect(err).to include("as well as --system")
+ expect(err).to include("Please choose only one option")
expect(exitstatus).to eq(15) if exitstatus
end
@@ -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(err).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"
@@ -174,11 +174,11 @@ RSpec.describe "install with --deployment or --frozen" do
ENV["BUNDLE_FROZEN"] = "1"
bundle "install"
- expect(out).to include("deployment mode")
- expect(out).to include("You have added to the Gemfile")
- expect(out).to include("* rack-obama")
- expect(out).not_to include("You have deleted from the Gemfile")
- expect(out).not_to include("You have changed in the Gemfile")
+ expect(err).to include("deployment mode")
+ expect(err).to include("You have added to the Gemfile")
+ expect(err).to include("* rack-obama")
+ expect(err).not_to include("You have deleted from the Gemfile")
+ expect(err).not_to include("You have changed in the Gemfile")
end
it "can have --deployment set via an environment variable" do
@@ -212,21 +212,6 @@ RSpec.describe "install with --deployment or --frozen" do
expect(out).not_to include("* rack-obama")
end
- it "explodes with the --frozen flag if you make a change and don't check in the lockfile", :bundler => "< 2" do
- gemfile <<-G
- source "file://#{gem_repo1}"
- gem "rack"
- gem "rack-obama", "1.1"
- G
-
- bundle :install, forgotten_command_line_options(:frozen => true)
- expect(err).to include("deployment mode")
- expect(err).to include("You have added to the Gemfile")
- expect(err).to include("* rack-obama (= 1.1)")
- expect(err).not_to include("You have deleted from the Gemfile")
- expect(err).not_to include("You have changed in the Gemfile")
- end
-
it "explodes if you remove a gem and don't check in the lockfile" do
gemfile <<-G
source "file://#{gem_repo1}"
@@ -297,11 +282,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"
- "Could not reach host localgemserver.test"
- else
- "Bundle complete!"
- end
+ "Bundle complete!"
end
before do
diff --git a/spec/install/gemfile/git_spec.rb b/spec/install/gemfile/git_spec.rb
index 4636c8de08..f208853041 100644
--- a/spec/install/gemfile/git_spec.rb
+++ b/spec/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/install/gemfile/groups_spec.rb b/spec/install/gemfile/groups_spec.rb
index 2787172057..f836499148 100644
--- a/spec/install/gemfile/groups_spec.rb
+++ b/spec/install/gemfile/groups_spec.rb
@@ -192,22 +192,22 @@ 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")
+ expect(err).to include("The offending groups are: emo")
end
it "allows the BUNDLE_WITH setting to override BUNDLE_WITHOUT" do
diff --git a/spec/install/gemfile/path_spec.rb b/spec/install/gemfile/path_spec.rb
index 40c137cd4a..54a41b576f 100644
--- a/spec/install/gemfile/path_spec.rb
+++ b/spec/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/install/gemfile/platform_spec.rb b/spec/install/gemfile/platform_spec.rb
index 7757a3c7c4..891f766cc0 100644
--- a/spec/install/gemfile/platform_spec.rb
+++ b/spec/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
@@ -248,7 +248,7 @@ RSpec.describe "bundle install across platforms" do
gem "facter"
G
- expect(out).to include "Unable to use the platform-specific (universal-darwin) version of facter (2.4.6) " \
+ expect(err).to include "Unable to use the platform-specific (universal-darwin) version of facter (2.4.6) " \
"because it has different dependencies from the ruby version. " \
"To use the platform-specific version of the gem, run `bundle config set specific_platform true` and install again."
diff --git a/spec/install/gems/compact_index_spec.rb b/spec/install/gems/compact_index_spec.rb
index 9f03c2a20f..b94b68dbd9 100644
--- a/spec/install/gems/compact_index_spec.rb
+++ b/spec/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}"
@@ -628,8 +628,8 @@ The checksum of /versions does not match the checksum provided by the server! So
G
bundle! :install, :artifice => "compact_index_basic_authentication"
- expect(out).to include("Warning: the gem 'rack' was found in multiple sources.")
- expect(out).not_to include("#{user}:#{password}")
+ expect(err).to include("Warning: the gem 'rack' was found in multiple sources.")
+ expect(err).not_to include("#{user}:#{password}")
expect(the_bundle).to include_gems "rack 1.0.0"
end
diff --git a/spec/install/gems/dependency_api_spec.rb b/spec/install/gems/dependency_api_spec.rb
index b7b71055f6..0dc1ee87f2 100644
--- a/spec/install/gems/dependency_api_spec.rb
+++ b/spec/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}"
@@ -602,8 +602,8 @@ RSpec.describe "gemcutter's dependency API" do
G
bundle :install, :artifice => "endpoint_basic_authentication"
- expect(out).to include("Warning: the gem 'rack' was found in multiple sources.")
- expect(out).not_to include("#{user}:#{password}")
+ expect(err).to include("Warning: the gem 'rack' was found in multiple sources.")
+ expect(err).not_to include("#{user}:#{password}")
expect(the_bundle).to include_gems "rack 1.0.0"
end
diff --git a/spec/install/gems/standalone_spec.rb b/spec/install/gems/standalone_spec.rb
index 2c7dd09f91..e2cfe5ec4c 100644
--- a/spec/install/gems/standalone_spec.rb
+++ b/spec/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/install/git_spec.rb b/spec/install/git_spec.rb
index ac315f51c0..68b2f47c10 100644
--- a/spec/install/git_spec.rb
+++ b/spec/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/install/path_spec.rb b/spec/install/path_spec.rb
index c645ba18a3..0947ed9539 100644
--- a/spec/install/path_spec.rb
+++ b/spec/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(err).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 set 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 set --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 set --global disable_shared_gems true"
diff --git a/spec/install/post_bundle_message_spec.rb b/spec/install/post_bundle_message_spec.rb
index 1ea21a6635..1efd0b8146 100644
--- a/spec/install/post_bundle_message_spec.rb
+++ b/spec/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
diff --git a/spec/install/redownload_spec.rb b/spec/install/redownload_spec.rb
index de726c4562..2a0cdc9473 100644
--- a/spec/install/redownload_spec.rb
+++ b/spec/install/redownload_spec.rb
@@ -56,30 +56,20 @@ RSpec.describe "bundle install" do
end
end
- describe "with --force" do
+ describe "with --force", :bundler => 2 do
it_behaves_like "an option to force redownloading gems" do
let(:flag) { "force" }
end
- it "shows a deprecation when single flag passed", :bundler => 2 do
+ it "shows a deprecation when single flag passed" do
bundle! "install --force"
expect(err).to include "[DEPRECATED] The `--force` option has been renamed to `--redownload`"
end
- it "shows a deprecation when multiple flags passed", :bundler => 2 do
+ it "shows a deprecation when multiple flags passed" do
bundle! "install --no-color --force"
expect(err).to include "[DEPRECATED] The `--force` option has been renamed to `--redownload`"
end
-
- it "does not show a deprecation when single flag passed", :bundler => "< 2" do
- bundle! "install --force"
- expect(out).not_to include "[DEPRECATED] The `--force` option has been renamed to `--redownload`"
- end
-
- it "does not show a deprecation when multiple flags passed", :bundler => "< 2" do
- bundle! "install --no-color --force"
- expect(out).not_to include "[DEPRECATED] The `--force` option has been renamed to `--redownload`"
- end
end
describe "with --redownload" do