diff options
author | Zehan Zhao <cnallenzhao@gmail.com> | 2016-08-15 22:44:19 +0800 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-08-16 15:55:29 +0200 |
commit | 792d7247523d728bfd792eeaf5f6565dadbf5eda (patch) | |
tree | c2eca22605db402db7a51d47c28d5fade07ff02c /spec | |
parent | 06d0acc45adb92298d3c012fba420f45277b26af (diff) | |
download | bundler-792d7247523d728bfd792eeaf5f6565dadbf5eda.tar.gz |
Fix open default gem error
Diffstat (limited to 'spec')
-rw-r--r-- | spec/commands/open_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/commands/open_spec.rb b/spec/commands/open_spec.rb index 51af34a875..649ae06fda 100644 --- a/spec/commands/open_spec.rb +++ b/spec/commands/open_spec.rb @@ -91,4 +91,17 @@ RSpec.describe "bundle open" do expect(out).not_to include("BUNDLE_GEMFILE=") end end + + context "when opening a default gem" do + before do + install_gemfile <<-G + gem "json" + G + end + + it "throws proper error when trying to open default gem" do + bundle "open json", :env => { "EDITOR" => "echo editor", "VISUAL" => "echo visual", "BUNDLER_EDITOR" => "echo bundler_editor" } + expect(out).to include("Unable to open json because it's a default gem, so the directory it would normally be installed to does not exist.") + end + end end |