summaryrefslogtreecommitdiff
path: root/spec/bundler/commands/check_spec.rb
diff options
context:
space:
mode:
authorJerome Dalbert <[email protected]>2024-07-25 02:02:21 -0700
committergit <[email protected]>2024-07-26 07:56:15 +0000
commit71dec15a70593d769804f4310c4746aba0883fae (patch)
tree8034a712622948fb49075bf2537996a0cd39d73a /spec/bundler/commands/check_spec.rb
parent3542ad52e2e05ffb7507b3effccc184b1d8bdcfa (diff)
[rubygems/rubygems] Fix bundle check exit code when git gem is missing
Make `bundle check` exit with code 1 when gem git source is not yet checked out. https://github.com/rubygems/rubygems/commit/93162bf5af
Diffstat (limited to 'spec/bundler/commands/check_spec.rb')
-rw-r--r--spec/bundler/commands/check_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/bundler/commands/check_spec.rb b/spec/bundler/commands/check_spec.rb
index 2b6463b318..18c4b2d89f 100644
--- a/spec/bundler/commands/check_spec.rb
+++ b/spec/bundler/commands/check_spec.rb
@@ -70,6 +70,17 @@ RSpec.describe "bundle check" do
expect(err).to include("Bundler can't satisfy your Gemfile's dependencies.")
end
+ it "prints a generic error if gem git source is not checked out" do
+ gemfile <<-G
+ source "https://gem.repo1"
+ gem "rails", git: "[email protected]:rails/rails.git"
+ G
+
+ bundle :check, raise_on_error: false
+ expect(exitstatus).to eq 1
+ expect(err).to include("Bundler can't satisfy your Gemfile's dependencies.")
+ end
+
it "prints a generic message if you changed your lockfile" do
build_repo2 do
build_gem "rails_pinned_to_old_activesupport" do |s|