summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/bundler/bundler/cli_spec.rb19
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