diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-03-24 04:52:19 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-24 04:52:19 +0900 |
commit | 2efda212b0d9ad5ec265271db25ad51d796fde44 (patch) | |
tree | b2667694205da0fd71dfa8dafc2655f6d464896e /spec/bundler/bundler/installer | |
parent | ff2ea4daeb795ebb3d0afa8c57d86a4af9757e50 (diff) |
Merge RubyGems-3.2.15 and Bundler-2.2.15 (#4311)
Diffstat (limited to 'spec/bundler/bundler/installer')
-rw-r--r-- | spec/bundler/bundler/installer/parallel_installer_spec.rb | 33 | ||||
-rw-r--r-- | spec/bundler/bundler/installer/spec_installation_spec.rb | 4 |
2 files changed, 37 insertions, 0 deletions
diff --git a/spec/bundler/bundler/installer/parallel_installer_spec.rb b/spec/bundler/bundler/installer/parallel_installer_spec.rb index ace5c1a23a..e680633862 100644 --- a/spec/bundler/bundler/installer/parallel_installer_spec.rb +++ b/spec/bundler/bundler/installer/parallel_installer_spec.rb @@ -44,4 +44,37 @@ The missing gems are: end end end + + context "when the spec set is not a valid resolution" do + let(:all_specs) do + [ + build_spec("cucumber", "4.1.0") {|s| s.runtime "diff-lcs", "< 1.4" }, + build_spec("diff-lcs", "1.4.4"), + ].flatten + end + + it "prints a warning" do + expect(Bundler.ui).to receive(:warn).with(<<-W.strip) +Your lockfile doesn't include a valid resolution. +You can fix this by regenerating your lockfile or trying to manually editing the bad locked gems to a version that satisfies all dependencies. +The unmet dependencies are: +* diff-lcs (< 1.4), depended upon cucumber-4.1.0, unsatisfied by diff-lcs-1.4.4 + W + subject.check_for_unmet_dependencies + end + end + + context "when the spec set is a valid resolution" do + let(:all_specs) do + [ + build_spec("cucumber", "4.1.0") {|s| s.runtime "diff-lcs", "< 1.4" }, + build_spec("diff-lcs", "1.3"), + ].flatten + end + + it "doesn't print a warning" do + expect(Bundler.ui).not_to receive(:warn) + subject.check_for_unmet_dependencies + end + end end diff --git a/spec/bundler/bundler/installer/spec_installation_spec.rb b/spec/bundler/bundler/installer/spec_installation_spec.rb index a9cf09a372..e63ef26cb3 100644 --- a/spec/bundler/bundler/installer/spec_installation_spec.rb +++ b/spec/bundler/bundler/installer/spec_installation_spec.rb @@ -8,6 +8,10 @@ RSpec.describe Bundler::ParallelInstaller::SpecInstallation do def a_spec.name "I like tests" end + + def a_spec.full_name + "I really like tests" + end a_spec end |