2018-11-02 23:07:56 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-04-14 06:01:35 +00:00
|
|
|
RSpec.describe "bundle update" do
|
2018-11-02 23:07:56 +00:00
|
|
|
before :each do
|
|
|
|
install_gemfile <<-G
|
2019-05-06 18:06:21 +02:00
|
|
|
source "#{file_uri_for(gem_repo1)}"
|
2018-11-02 23:07:56 +00:00
|
|
|
gem "rack"
|
|
|
|
G
|
|
|
|
end
|
|
|
|
|
|
|
|
describe "with --force" do
|
2019-04-14 06:01:35 +00:00
|
|
|
it "shows a deprecation when single flag passed", :bundler => 2 do
|
2020-06-03 20:45:36 +02:00
|
|
|
bundle "update rack --force"
|
2019-04-14 06:01:35 +00:00
|
|
|
expect(err).to include "[DEPRECATED] The `--force` option has been renamed to `--redownload`"
|
2018-11-02 23:07:56 +00:00
|
|
|
end
|
|
|
|
|
2019-04-14 06:01:35 +00:00
|
|
|
it "shows a deprecation when multiple flags passed", :bundler => 2 do
|
2020-06-03 20:45:36 +02:00
|
|
|
bundle "update rack --no-color --force"
|
2019-04-14 06:01:35 +00:00
|
|
|
expect(err).to include "[DEPRECATED] The `--force` option has been renamed to `--redownload`"
|
2018-11-02 23:07:56 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
describe "with --redownload" do
|
|
|
|
it "does not show a deprecation when single flag passed" do
|
2020-06-03 20:45:36 +02:00
|
|
|
bundle "update rack --redownload"
|
2019-04-14 06:01:35 +00:00
|
|
|
expect(err).not_to include "[DEPRECATED] The `--force` option has been renamed to `--redownload`"
|
2018-11-02 23:07:56 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
it "does not show a deprecation when single multiple flags passed" do
|
2020-06-03 20:45:36 +02:00
|
|
|
bundle "update rack --no-color --redownload"
|
2019-04-14 06:01:35 +00:00
|
|
|
expect(err).not_to include "[DEPRECATED] The `--force` option has been renamed to `--redownload`"
|
2018-11-02 23:07:56 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|