Skip to content
This repository was archived by the owner on Apr 14, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions spec/commands/exec_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -843,10 +843,7 @@ def bin_path(a,b,c)
expect(bundle!("exec #{file}", :artifice => nil)).to eq(expected)
expect(bundle!("exec bundle exec #{file}", :artifice => nil)).to eq(expected)
expect(bundle!("exec ruby #{file}", :artifice => nil)).to eq(expected)
# Ignore expectation for default bundler gem conflict.
unless ENV["BUNDLER_SPEC_SUB_VERSION"]
expect(run!(file.read, :artifice => nil)).to eq(expected)
end
expect(run!(file.read, :artifice => nil)).to eq(expected)
end

# sanity check that we get the newer, custom version without bundler
Expand Down
16 changes: 13 additions & 3 deletions spec/install/redownload_spec.rb
Original file line number Diff line number Diff line change
@@ -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}"
Expand Down Expand Up @@ -61,15 +61,25 @@
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
Expand Down
16 changes: 13 additions & 3 deletions spec/update/redownload_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

RSpec.describe "bundle update", :bundler => "2" do
RSpec.describe "bundle update" do
before :each do
install_gemfile <<-G
source "file://#{gem_repo1}"
Expand All @@ -9,15 +9,25 @@
end

describe "with --force" do
it "shows a deprecation when single flag passed" do
it "shows a deprecation when single flag passed", :bundler => 2 do
bundle! "update rack --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! "update rack --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! "update rack --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! "update rack --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
Expand Down