summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorZehan Zhao <cnallenzhao@gmail.com>2016-08-15 22:44:19 +0800
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-08-16 15:55:29 +0200
commit792d7247523d728bfd792eeaf5f6565dadbf5eda (patch)
treec2eca22605db402db7a51d47c28d5fade07ff02c /spec
parent06d0acc45adb92298d3c012fba420f45277b26af (diff)
downloadbundler-792d7247523d728bfd792eeaf5f6565dadbf5eda.tar.gz
Fix open default gem error
Diffstat (limited to 'spec')
-rw-r--r--spec/commands/open_spec.rb13
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