diff options
author | Andre Arko <andre@arko.net> | 2010-04-02 12:48:29 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2010-04-02 12:53:07 -0700 |
commit | b4958b53485f37bd1f595e7e9e222195ef252273 (patch) | |
tree | ac8376e9e76cb1402eb5a661d948353d0f633802 /spec/other/open_spec.rb | |
parent | b9ed78c664966a4f7756d18d67ebaf8bd3e6dc65 (diff) | |
download | bundler-b4958b53485f37bd1f595e7e9e222195ef252273.tar.gz |
Fix check, show, and open commands while locked. Closes #237.
Diffstat (limited to 'spec/other/open_spec.rb')
-rw-r--r-- | spec/other/open_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/other/open_spec.rb b/spec/other/open_spec.rb index 8fc4534e..59d5eb7b 100644 --- a/spec/other/open_spec.rb +++ b/spec/other/open_spec.rb @@ -22,4 +22,20 @@ describe "bundle open" do bundle "open missing", :env => {"EDITOR" => "echo editor", "VISUAL" => ''} out.should match(/could not find gem 'missing'/i) end + + describe "while locked" do + before :each do + bundle :lock + end + + it "opens the gem with EDITOR if set" do + 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", "VISUAL" => ''} + out.should match(/could not find gem 'missing'/i) + end + end end |