[rubygems/rubygems] Added extra examples for cli_help default command

https://github.com/rubygems/rubygems/commit/b2472e7b82

Co-authored-by: David Rodríguez <2887858+deivid-rodriguez@users.noreply.github.com>
This commit is contained in:
Hiroshi SHIBATA 2025-10-10 15:32:29 +09:00 committed by git
parent aac6f06815
commit 4a285dd91a

View File

@ -87,7 +87,7 @@ RSpec.describe "bundle executable" do
end
context "with no arguments" do
it "prints a concise help message", bundler: "4" do
it "prints a concise help message by default" do
bundle ""
expect(err).to be_empty
expect(out).to include("Bundler version #{Bundler::VERSION}").
@ -96,6 +96,23 @@ RSpec.describe "bundle executable" do
and include("\n\n Utilities:\n").
and include("\n\nOptions:\n")
end
it "prints a concise help message when default_cli_command set to cli_help" do
bundle "config set default_cli_command cli_help"
bundle ""
expect(err).to be_empty
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
it "runs bundle install when default_cli_command set to install" do
bundle "config set default_cli_command install"
bundle "", raise_on_error: false
expect(err).to include("Could not locate Gemfile")
end
end
context "when ENV['BUNDLE_GEMFILE'] is set to an empty string" do