diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-03-15 19:31:48 +0100 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-03-15 19:31:48 +0100 |
commit | 0a396b8f530bec57d19cad5202baa002d74d5e80 (patch) | |
tree | 28a2c4916feff2b48813aea51e422fd194bb8d0f | |
parent | 1591215e636d68117c04158dfe8da81c8ef2b357 (diff) | |
download | bundler-0a396b8f530bec57d19cad5202baa002d74d5e80.tar.gz |
Fix deprecation version for `bundle config`
And add specs for it.
-rw-r--r-- | lib/bundler/cli/config.rb | 2 | ||||
-rw-r--r-- | spec/other/major_deprecation_spec.rb | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/lib/bundler/cli/config.rb b/lib/bundler/cli/config.rb index cc89465adc..f412e80829 100644 --- a/lib/bundler/cli/config.rb +++ b/lib/bundler/cli/config.rb @@ -14,7 +14,7 @@ module Bundler scope_options method_option :delete, :type => :boolean, :banner => "delete" def base(name = nil, *value) - SharedHelpers.major_deprecation 3, + SharedHelpers.major_deprecation 2, "Using the `config` command without a subcommand [list, get, set, unset]" Base.new(options, name, value, self).run end diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb index 3eeeb32b89..e330f6bb38 100644 --- a/spec/other/major_deprecation_spec.rb +++ b/spec/other/major_deprecation_spec.rb @@ -52,6 +52,20 @@ RSpec.describe "major deprecations" do end end + describe "bundle config" do + before do + bundle! "config" + end + + it "does not warn when no options are given", :bundler => "< 2" do + expect(deprecations).to be_empty + end + + it "warns when no options are given", :bundler => "2" do + expect(deprecations).to include("Using the `config` command without a subcommand [list, get, set, unset]") + end + end + describe "bundle update" do before do bundle! "install" |