diff options
Diffstat (limited to 'spec/bundler/install/redownload_spec.rb')
-rw-r--r-- | spec/bundler/install/redownload_spec.rb | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/spec/bundler/install/redownload_spec.rb b/spec/bundler/install/redownload_spec.rb index f9caeed58a..2a0cdc9473 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 => "< 3", :ruby => ">= 2.0" do +RSpec.describe "bundle install" do before :each do gemfile <<-G source "file://#{gem_repo1}" @@ -8,8 +8,6 @@ RSpec.describe "bundle install", :bundler => "< 3", :ruby => ">= 2.0" do G end - before { bundle "config major_deprecations yes" } - shared_examples_for "an option to force redownloading gems" do it "re-installs installed gems" do rack_lib = default_bundle_path("gems/rack-1.0.0/lib/rack.rb") @@ -58,19 +56,19 @@ RSpec.describe "bundle install", :bundler => "< 3", :ruby => ">= 2.0" 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" do bundle! "install --force" - expect(out).to include "[DEPRECATED FOR 3.0] The `--force` option has been renamed to `--redownload`" + expect(err).to include "[DEPRECATED] 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 3.0] The `--force` option has been renamed to `--redownload`" + expect(err).to include "[DEPRECATED] The `--force` option has been renamed to `--redownload`" end end @@ -81,12 +79,12 @@ RSpec.describe "bundle install", :bundler => "< 3", :ruby => ">= 2.0" do it "does not show a deprecation when single flag passed" do bundle! "install --redownload" - expect(out).not_to include "[DEPRECATED FOR 2.0] The `--force` option has been renamed to `--redownload`" + expect(err).not_to include "[DEPRECATED] The `--force` option has been renamed to `--redownload`" end it "does not show a deprecation when single multiple flags passed" do bundle! "install --no-color --redownload" - expect(out).not_to include "[DEPRECATED FOR 2.0] The `--force` option has been renamed to `--redownload`" + expect(err).not_to include "[DEPRECATED] The `--force` option has been renamed to `--redownload`" end end end |