diff options
| author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2025-10-10 15:32:29 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2025-10-10 07:59:35 +0000 |
| commit | 4a285dd91aaacc7da44ce63191f41a1a1c287828 (patch) | |
| tree | 3d2b749edfb5df48eb51098fe4c624dca7c75b03 | |
| parent | aac6f0681536c8ca58638714c2cc8d7e35aa6a37 (diff) | |
[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>
| -rw-r--r-- | spec/bundler/bundler/cli_spec.rb | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/spec/bundler/bundler/cli_spec.rb b/spec/bundler/bundler/cli_spec.rb index 07f589bd5d..b3a97e72ce 100644 --- a/spec/bundler/bundler/cli_spec.rb +++ b/spec/bundler/bundler/cli_spec.rb @@ -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 |
