aboutsummaryrefslogtreecommitdiffstats
path: root/spec/other/open_spec.rb
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2010-04-02 12:48:29 -0700
committerAndre Arko <andre@arko.net>2010-04-02 12:53:07 -0700
commitb4958b53485f37bd1f595e7e9e222195ef252273 (patch)
treeac8376e9e76cb1402eb5a661d948353d0f633802 /spec/other/open_spec.rb
parentb9ed78c664966a4f7756d18d67ebaf8bd3e6dc65 (diff)
downloadbundler-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.rb16
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