summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorBundlerbot <bot@bundler.io>2019-10-30 10:16:36 +0000
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-11-07 16:41:41 +0100
commit5689838e4c674eba7aaa31cf5226c5e194707417 (patch)
treef97e4e61436b1454298ea237cd8d6d2872e8b360 /spec
parent49dbb01823b8863b6b853fd48a7f030e34207d57 (diff)
downloadbundler-5689838e4c674eba7aaa31cf5226c5e194707417.tar.gz
Merge #7388
7388: Fix help with command aliases r=deivid-rodriguez a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was that the output of `bundle help install` and `bundle install --help` was inconstent with `bundle i --help`, and the same issue with all of the other command aliases. ### What was your diagnosis of the problem? My diagnosis was that the command reformatting so that `bundle <cmd> --help` "redirects" to `bundle help <cmd>` was ignoring command aliases. ### What is your fix for the problem, implemented in this PR? My fix is to make this logic aware of command aliases. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net> (cherry picked from commit 5bc9c5868307679b79cdb7e4026da5f9e3888c63)
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/cli_spec.rb50
1 files changed, 50 insertions, 0 deletions
diff --git a/spec/bundler/cli_spec.rb b/spec/bundler/cli_spec.rb
index 02e5155733..ddcd699d6c 100644
--- a/spec/bundler/cli_spec.rb
+++ b/spec/bundler/cli_spec.rb
@@ -27,6 +27,56 @@ RSpec.describe "bundle executable" do
expect(out).to eq("Hello, world")
end
+ describe "aliases" do
+ it "aliases e to exec" do
+ bundle "e --help"
+
+ expect(out).to include("BUNDLE-EXEC")
+ end
+
+ it "aliases ex to exec" do
+ bundle "ex --help"
+
+ expect(out).to include("BUNDLE-EXEC")
+ end
+
+ it "aliases exe to exec" do
+ bundle "exe --help"
+
+ expect(out).to include("BUNDLE-EXEC")
+ end
+
+ it "aliases c to check" do
+ bundle "c --help"
+
+ expect(out).to include("BUNDLE-CHECK")
+ end
+
+ it "aliases i to install" do
+ bundle "i --help"
+
+ expect(out).to include("BUNDLE-INSTALL")
+ end
+
+ it "aliases ls to list" do
+ bundle "ls --help"
+
+ expect(out).to include("BUNDLE-LIST")
+ end
+
+ it "aliases package to cache" do
+ bundle "package --help"
+
+ expect(out).to include("BUNDLE-CACHE")
+ end
+
+ it "aliases pack to cache" do
+ bundle "pack --help"
+
+ expect(out).to include("BUNDLE-CACHE")
+ end
+ end
+
context "with no arguments" do
it "prints a concise help message", :bundler => "3" do
bundle! ""