diff options
author | yoka <jesse.ikonen@gmail.com> | 2022-12-31 10:58:34 +0200 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-01-04 13:13:19 +0000 |
commit | 799d805e215e3bdcc2e9bbdb48638a129b50e8f4 (patch) | |
tree | 97d99b666b2f86458c664551e05e3a6e3216bf0d /spec/bundler/commands/open_spec.rb | |
parent | 87c17a141dc4491abf5282d164f2cba13ade18c4 (diff) | |
download | ruby-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/commands/open_spec.rb')
-rw-r--r-- | spec/bundler/commands/open_spec.rb | 5 |
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) |