diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2018-09-18 20:12:01 -0300 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2018-09-18 21:40:54 -0300 |
commit | 18ae708c3c3736a17879ce365368e6db7a5576ab (patch) | |
tree | b6fbdafeaf79798082a27c651d5f848dcec40db9 /spec/install/redownload_spec.rb | |
parent | 90109e4efd2ba96967a2f2a8326c6f82d4e67297 (diff) | |
download | bundler-18ae708c3c3736a17879ce365368e6db7a5576ab.tar.gz |
Deprecate `bundle install --force`
Instead of hard erroring, deprecate the `--force` flag on bundler 2 to
better teach users about the replacement.
Before:
$ bundle install --force
Unknown switches '--force'
After:
$ bundle install --force
[DEPRECATED FOR 2.0] The `--force` option has been renamed to `--redownload`
Could not locate Gemfile # or whatever the expected behavior for --redownload is
Diffstat (limited to 'spec/install/redownload_spec.rb')
-rw-r--r-- | spec/install/redownload_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/install/redownload_spec.rb b/spec/install/redownload_spec.rb index 626a4a8e9f..d6fcc9c2b8 100644 --- a/spec/install/redownload_spec.rb +++ b/spec/install/redownload_spec.rb @@ -60,11 +60,21 @@ RSpec.describe "bundle install" do it_behaves_like "an option to force redownloading gems" do let(:flag) { "force" } end + + it "shows a deprecation" do + bundle! :install, :force => true + expect(out).to include "[DEPRECATED FOR 2.0] The `--force` option has been renamed to `--redownload`" + end end describe "with --redownload" do it_behaves_like "an option to force redownloading gems" do let(:flag) { "redownload" } end + + it "does not show a deprecation" do + bundle! :install, :redownload => true + expect(out).not_to include "[DEPRECATED FOR 2.0] The `--force` option has been renamed to `--redownload`" + end end end |