summaryrefslogtreecommitdiff
path: root/spec/bundler
diff options
context:
space:
mode:
authoryoka <jesse.ikonen@gmail.com>2022-12-31 10:58:34 +0200
committergit <svn-admin@ruby-lang.org>2023-01-04 13:13:19 +0000
commit799d805e215e3bdcc2e9bbdb48638a129b50e8f4 (patch)
tree97d99b666b2f86458c664551e05e3a6e3216bf0d /spec/bundler
parent87c17a141dc4491abf5282d164f2cba13ade18c4 (diff)
downloadruby-799d805e215e3bdcc2e9bbdb48638a129b50e8f4.tar.gz
[rubygems/rubygems] Raise invalid option when bundle open --path is called without a value
https://github.com/rubygems/rubygems/commit/c242311158
Diffstat (limited to 'spec/bundler')
-rw-r--r--spec/bundler/commands/open_spec.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/bundler/commands/open_spec.rb b/spec/bundler/commands/open_spec.rb
index 570e0f5961..e30ebfea5b 100644
--- a/spec/bundler/commands/open_spec.rb
+++ b/spec/bundler/commands/open_spec.rb
@@ -73,6 +73,11 @@ RSpec.describe "bundle open" do
expect(out).to include("editor #{default_bundle_path("gems", "activerecord-2.3.2")}/lib/active_record")
end
+ it "requires value for --path arg" do
+ bundle "open activerecord --path", :env => { "EDITOR" => "echo editor", "VISUAL" => "", "BUNDLER_EDITOR" => "" }, :raise_on_error => false
+ expect(err).to eq "Cannot specify `--path` option without a value"
+ end
+
it "suggests alternatives for similar-sounding gems when using subpath" do
bundle "open Rails --path README.md", :env => { "EDITOR" => "echo editor", "VISUAL" => "", "BUNDLER_EDITOR" => "" }, :raise_on_error => false
expect(err).to match(/did you mean rails\?/i)