diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2022-03-01 13:46:49 +0100 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2022-03-06 22:17:00 +0900 |
commit | 156079a85d29a137521e6b911a39c25f35a960d2 (patch) | |
tree | 285775d52f3f042a025d45937c850cd404864fc3 /spec/bundler/commands/outdated_spec.rb | |
parent | 7cc0c53169759996f75eacd7cceb2ea8d47c57d7 (diff) |
[rubygems/rubygems] Make `--strict` flag of `update` and `outdated` commands consistent
Previously they had slightly different behavior when combined with
conservative updating flags.
The correct behavior is the `--update-strict` option, so `--script` now
does that, The `--update-strict` option is left there for now but I will
deprecate it later.
https://github.com/rubygems/rubygems/commit/ab42046229
Diffstat (limited to 'spec/bundler/commands/outdated_spec.rb')
-rw-r--r-- | spec/bundler/commands/outdated_spec.rb | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/spec/bundler/commands/outdated_spec.rb b/spec/bundler/commands/outdated_spec.rb index 731d67af1b..121e39f55a 100644 --- a/spec/bundler/commands/outdated_spec.rb +++ b/spec/bundler/commands/outdated_spec.rb @@ -570,8 +570,7 @@ RSpec.describe "bundle outdated" do end end - filter_strict_option = Bundler.feature_flag.bundler_2_mode? ? :"filter-strict" : :strict - describe "with --#{filter_strict_option} option" do + describe "with --filter-strict option" do before do build_repo2 do build_git "foo", :path => lib_path("foo") @@ -595,7 +594,7 @@ RSpec.describe "bundle outdated" do build_gem "weakling", "0.0.5" end - bundle :outdated, filter_strict_option => true, :raise_on_error => false + bundle :outdated, :"filter-strict" => true, :raise_on_error => false expected_output = <<~TABLE.strip Gem Current Latest Requested Groups @@ -611,7 +610,7 @@ RSpec.describe "bundle outdated" do gem "activesupport", platforms: [:ruby_22] G - bundle :outdated, filter_strict_option => true + bundle :outdated, :"filter-strict" => true expect(out).to end_with("Bundle up to date!") end @@ -622,7 +621,7 @@ RSpec.describe "bundle outdated" do gem "rack_middleware", "1.0" G - bundle :outdated, filter_strict_option => true + bundle :outdated, :"filter-strict" => true expect(out).to end_with("Bundle up to date!") end @@ -640,7 +639,7 @@ RSpec.describe "bundle outdated" do build_gem "weakling", "0.0.5" end - bundle :outdated, filter_strict_option => true, "filter-patch" => true, :raise_on_error => false + bundle :outdated, :"filter-strict" => true, "filter-patch" => true, :raise_on_error => false expected_output = <<~TABLE.strip Gem Current Latest Requested Groups @@ -662,7 +661,7 @@ RSpec.describe "bundle outdated" do build_gem "weakling", "0.1.5" end - bundle :outdated, filter_strict_option => true, "filter-minor" => true, :raise_on_error => false + bundle :outdated, :"filter-strict" => true, "filter-minor" => true, :raise_on_error => false expected_output = <<~TABLE.strip Gem Current Latest Requested Groups @@ -684,7 +683,7 @@ RSpec.describe "bundle outdated" do build_gem "weakling", "1.1.5" end - bundle :outdated, filter_strict_option => true, "filter-major" => true, :raise_on_error => false + bundle :outdated, :"filter-strict" => true, "filter-major" => true, :raise_on_error => false expected_output = <<~TABLE.strip Gem Current Latest Requested Groups @@ -1099,7 +1098,7 @@ RSpec.describe "bundle outdated" do end context "conservative updates" do - context "without update-strict" do + context "without --strict" do before do build_repo4 do build_gem "patch", %w[1.0.0 1.0.1] @@ -1165,7 +1164,7 @@ RSpec.describe "bundle outdated" do end end - context "with update-strict" do + context "with --strict" do before do build_repo4 do build_gem "foo", %w[1.4.3 1.4.4] do |s| @@ -1198,8 +1197,8 @@ RSpec.describe "bundle outdated" do G end - it "shows gems with update-strict updating to patch and filtering to patch" do - bundle "outdated --patch --update-strict --filter-patch", :raise_on_error => false + it "shows gems with --strict updating to patch and filtering to patch" do + bundle "outdated --patch --strict --filter-patch", :raise_on_error => false expected_output = <<~TABLE.strip Gem Current Latest Requested Groups |