diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-02-02 20:23:14 +0900 |
---|---|---|
committer | NARUSE, Yui <nurse@users.noreply.github.com> | 2021-02-02 21:30:08 +0900 |
commit | cc51cfabfd0592dd49d4a8ad4bc78e0520128e72 (patch) | |
tree | a9de6659d2201e326fd0ecead4252f87a4feb177 /spec/bundler/commands | |
parent | 71b4638ca29a5d8a7d6f72e453513035d2096f47 (diff) |
Merge Bundler-2.2.7
Diffstat (limited to 'spec/bundler/commands')
-rw-r--r-- | spec/bundler/commands/cache_spec.rb | 13 | ||||
-rw-r--r-- | spec/bundler/commands/update_spec.rb | 13 |
2 files changed, 17 insertions, 9 deletions
diff --git a/spec/bundler/commands/cache_spec.rb b/spec/bundler/commands/cache_spec.rb index 173389c068..df5f01bc45 100644 --- a/spec/bundler/commands/cache_spec.rb +++ b/spec/bundler/commands/cache_spec.rb @@ -1,6 +1,19 @@ # frozen_string_literal: true RSpec.describe "bundle cache" do + it "doesn't update the cache multiple times, even if it already exists" do + gemfile <<-G + source "#{file_uri_for(gem_repo1)}" + gem "rack" + G + + bundle :cache + expect(out).to include("Updating files in vendor/cache").once + + bundle :cache + expect(out).to include("Updating files in vendor/cache").once + end + context "with --gemfile" do it "finds the gemfile" do gemfile bundled_app("NotGemfile"), <<-G diff --git a/spec/bundler/commands/update_spec.rb b/spec/bundler/commands/update_spec.rb index b8de6507f6..521c175711 100644 --- a/spec/bundler/commands/update_spec.rb +++ b/spec/bundler/commands/update_spec.rb @@ -651,6 +651,8 @@ RSpec.describe "bundle update when a gem depends on a newer version of bundler" build_gem "rails", "3.0.1" do |s| s.add_dependency "bundler", Bundler::VERSION.succ end + + build_gem "bundler", Bundler::VERSION.succ end gemfile <<-G @@ -659,18 +661,11 @@ RSpec.describe "bundle update when a gem depends on a newer version of bundler" G end - it "should explain that bundler conflicted", :bundler => "< 3" do + it "should explain that bundler conflicted and how to resolve the conflict" do bundle "update", :all => true, :raise_on_error => false expect(last_command.stdboth).not_to match(/in snapshot/i) expect(err).to match(/current Bundler version/i). - and match(/perhaps you need to update bundler/i) - end - - it "should warn that the newer version of Bundler would conflict", :bundler => "3" do - bundle "update", :all => true - expect(err).to include("rails (3.0.1) has dependency bundler"). - and include("so the dependency is being ignored") - expect(the_bundle).to include_gem "rails 3.0.1" + and match(/Install the necessary version with `gem install bundler:#{Bundler::VERSION.succ}`/i) end end |