aboutsummaryrefslogtreecommitdiffstats
path: root/spec/other/open_spec.rb
diff options
context:
space:
mode:
authorTom Lea <commit@tomlea.co.uk>2010-03-25 18:20:50 +0000
committerAndre Arko <andre@arko.net>2010-03-30 10:12:31 -0700
commitc16c4e5756faab5b97cc63d784ceeecbbfcfa068 (patch)
tree828ccdd4af0d577905623514e1409a4f16a2938f /spec/other/open_spec.rb
parent7147a13b01e8943d28d38814521fc7343d7d479f (diff)
downloadbundler-c16c4e5756faab5b97cc63d784ceeecbbfcfa068.tar.gz
Allow the VISUAL environment variable for GUI editors
Diffstat (limited to 'spec/other/open_spec.rb')
-rw-r--r--spec/other/open_spec.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/other/open_spec.rb b/spec/other/open_spec.rb
index c4abdc39..8fc4534e 100644
--- a/spec/other/open_spec.rb
+++ b/spec/other/open_spec.rb
@@ -8,13 +8,18 @@ describe "bundle open" do
G
end
+ it "opens the gem with VISUAL if set" do
+ bundle "open rails", :env => {"EDITOR" => "echo editor", "VISUAL" => "echo visual"}
+ out.should == "visual #{default_bundle_path('gems', 'rails-2.3.2')}"
+ end
+
it "opens the gem with EDITOR if set" do
- bundle "open rails", :env => {"EDITOR" => "echo editor"}
+ bundle "open rails", :env => {"EDITOR" => "echo editor", "VISUAL" => ''}
out.should == "editor #{default_bundle_path('gems', 'rails-2.3.2')}"
end
it "complains if gem not in bundle" do
- bundle "open missing", :env => {"EDITOR" => "echo editor"}
+ bundle "open missing", :env => {"EDITOR" => "echo editor", "VISUAL" => ''}
out.should match(/could not find gem 'missing'/i)
end
end