summaryrefslogtreecommitdiff
path: root/spec/install/redownload_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/install/redownload_spec.rb')
-rw-r--r--spec/install/redownload_spec.rb16
1 files changed, 13 insertions, 3 deletions
diff --git a/spec/install/redownload_spec.rb b/spec/install/redownload_spec.rb
index 1225c839c4..232c0f9e2c 100644
--- a/spec/install/redownload_spec.rb
+++ b/spec/install/redownload_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-RSpec.describe "bundle install", :bundler => "2" do
+RSpec.describe "bundle install" do
before :each do
gemfile <<-G
source "file://#{gem_repo1}"
@@ -61,15 +61,25 @@ RSpec.describe "bundle install", :bundler => "2" do
let(:flag) { "force" }
end
- it "shows a deprecation when single flag passed" do
+ it "shows a deprecation when single flag passed", :bundler => 2 do
bundle! "install --force"
expect(out).to include "[DEPRECATED FOR 2.0] The `--force` option has been renamed to `--redownload`"
end
- it "shows a deprecation when multiple flags passed" do
+ it "shows a deprecation when multiple flags passed", :bundler => 2 do
bundle! "install --no-color --force"
expect(out).to include "[DEPRECATED FOR 2.0] 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 FOR 2.0] 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 FOR 2.0] The `--force` option has been renamed to `--redownload`"
+ end
end
describe "with --redownload" do