summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2025-12-16 11:09:34 +0900
committergit <svn-admin@ruby-lang.org>2025-12-16 02:36:10 +0000
commit060199910afeccd4c81f90beebbd406799c05c46 (patch)
treedf7fe29a0b59fa8ae7d0e5818665503a8c7aeb92 /spec
parent38d67986b044ec32681aabc3d9017c5bdb4e7289 (diff)
[ruby/rubygems] Allow to show cli_help with bundler executable
https://github.com/ruby/rubygems/commit/a091e3fd10
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/bundler/cli_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/bundler/bundler/cli_spec.rb b/spec/bundler/bundler/cli_spec.rb
index 7bc8fd3d36..e2c64b9394 100644
--- a/spec/bundler/bundler/cli_spec.rb
+++ b/spec/bundler/bundler/cli_spec.rb
@@ -282,4 +282,15 @@ RSpec.describe "bundler executable" do
bundler "--version"
expect(out).to eq("#{Bundler::VERSION} (simulating Bundler 5)")
end
+
+ it "shows cli_help when bundler install and no Gemfile is found" do
+ bundler "install", raise_on_error: false
+ expect(err).to include("Could not locate Gemfile")
+
+ expect(out).to include("Bundler version #{Bundler::VERSION}").
+ and include("\n\nBundler commands:\n\n").
+ and include("\n\n Primary commands:\n").
+ and include("\n\n Utilities:\n").
+ and include("\n\nOptions:\n")
+ end
end