diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-04-15 12:47:04 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-04-15 15:36:15 +0900 |
commit | ed149dbf46d1a8b16e6de9c3dbbcc10f72c9c019 (patch) | |
tree | 1c8c755fa592e280dc7718dc8a9317d1ac368394 /spec/bundler/commands/update_spec.rb | |
parent | 0d9496f924d36534bd524791554d49dc0026b0e0 (diff) |
Merge the master branch of Bundler
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4383
Diffstat (limited to 'spec/bundler/commands/update_spec.rb')
-rw-r--r-- | spec/bundler/commands/update_spec.rb | 100 |
1 files changed, 47 insertions, 53 deletions
diff --git a/spec/bundler/commands/update_spec.rb b/spec/bundler/commands/update_spec.rb index 521c175711..0f17d931a3 100644 --- a/spec/bundler/commands/update_spec.rb +++ b/spec/bundler/commands/update_spec.rb @@ -148,72 +148,66 @@ RSpec.describe "bundle update" do end describe "when a possible resolve requires an older version of a locked gem" do - context "and only_update_to_newer_versions is set" do - before do - bundle "config set only_update_to_newer_versions true" - end - - it "does not go to an older version" do - build_repo4 do - build_gem "tilt", "2.0.8" - build_gem "slim", "3.0.9" do |s| - s.add_dependency "tilt", [">= 1.3.3", "< 2.1"] - end - build_gem "slim_lint", "0.16.1" do |s| - s.add_dependency "slim", [">= 3.0", "< 5.0"] - end - build_gem "slim-rails", "0.2.1" do |s| - s.add_dependency "slim", ">= 0.9.2" - end - build_gem "slim-rails", "3.1.3" do |s| - s.add_dependency "slim", "~> 3.0" - end + it "does not go to an older version" do + build_repo4 do + build_gem "tilt", "2.0.8" + build_gem "slim", "3.0.9" do |s| + s.add_dependency "tilt", [">= 1.3.3", "< 2.1"] + end + build_gem "slim_lint", "0.16.1" do |s| + s.add_dependency "slim", [">= 3.0", "< 5.0"] + end + build_gem "slim-rails", "0.2.1" do |s| + s.add_dependency "slim", ">= 0.9.2" + end + build_gem "slim-rails", "3.1.3" do |s| + s.add_dependency "slim", "~> 3.0" end + end - install_gemfile <<-G - source "#{file_uri_for(gem_repo4)}" - gem "slim-rails" - gem "slim_lint" - G + install_gemfile <<-G + source "#{file_uri_for(gem_repo4)}" + gem "slim-rails" + gem "slim_lint" + G - expect(the_bundle).to include_gems("slim 3.0.9", "slim-rails 3.1.3", "slim_lint 0.16.1") + expect(the_bundle).to include_gems("slim 3.0.9", "slim-rails 3.1.3", "slim_lint 0.16.1") - update_repo4 do - build_gem "slim", "4.0.0" do |s| - s.add_dependency "tilt", [">= 2.0.6", "< 2.1"] - end + update_repo4 do + build_gem "slim", "4.0.0" do |s| + s.add_dependency "tilt", [">= 2.0.6", "< 2.1"] end + end - bundle "update", :all => true + bundle "update", :all => true - expect(the_bundle).to include_gems("slim 3.0.9", "slim-rails 3.1.3", "slim_lint 0.16.1") - end + expect(the_bundle).to include_gems("slim 3.0.9", "slim-rails 3.1.3", "slim_lint 0.16.1") + end - it "should still downgrade if forced by the Gemfile" do - build_repo4 do - build_gem "a" - build_gem "b", "1.0" - build_gem "b", "2.0" - end + it "should still downgrade if forced by the Gemfile" do + build_repo4 do + build_gem "a" + build_gem "b", "1.0" + build_gem "b", "2.0" + end - install_gemfile <<-G - source "#{file_uri_for(gem_repo4)}" - gem "a" - gem "b" - G + install_gemfile <<-G + source "#{file_uri_for(gem_repo4)}" + gem "a" + gem "b" + G - expect(the_bundle).to include_gems("a 1.0", "b 2.0") + expect(the_bundle).to include_gems("a 1.0", "b 2.0") - gemfile <<-G - source "#{file_uri_for(gem_repo4)}" - gem "a" - gem "b", "1.0" - G + gemfile <<-G + source "#{file_uri_for(gem_repo4)}" + gem "a" + gem "b", "1.0" + G - bundle "update b" + bundle "update b" - expect(the_bundle).to include_gems("a 1.0", "b 1.0") - end + expect(the_bundle).to include_gems("a 1.0", "b 1.0") end end |