diff options
author | Tom Lea <commit@tomlea.co.uk> | 2010-03-25 18:20:50 +0000 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2010-03-30 10:12:31 -0700 |
commit | c16c4e5756faab5b97cc63d784ceeecbbfcfa068 (patch) | |
tree | 828ccdd4af0d577905623514e1409a4f16a2938f /spec/other/open_spec.rb | |
parent | 7147a13b01e8943d28d38814521fc7343d7d479f (diff) | |
download | bundler-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.rb | 9 |
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 |