summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorTerence Lee <hone02@gmail.com>2011-09-18 03:31:24 -0700
committerTerence Lee <hone02@gmail.com>2011-09-18 03:47:12 -0700
commitee73d0b1a8e42b190ff8a514b26e12c5df6d9836 (patch)
tree3121c2ac18f7926bc77dde4f38183a2d02c62e4a /spec
parent464981786589b588c5825c30de4228da327b2002 (diff)
downloadbundler-ee73d0b1a8e42b190ff8a514b26e12c5df6d9836.tar.gz
add --force to bundle clean, thanks @ebeigarts
Diffstat (limited to 'spec')
-rw-r--r--spec/other/clean_spec.rb25
1 files changed, 24 insertions, 1 deletions
diff --git a/spec/other/clean_spec.rb b/spec/other/clean_spec.rb
index 8f739393ed..c36825752d 100644
--- a/spec/other/clean_spec.rb
+++ b/spec/other/clean_spec.rb
@@ -241,7 +241,7 @@ describe "bundle clean" do
bundle :clean
- out.should == "Can only use bundle clean when --path is set"
+ out.should == "Can only use bundle clean when --path is set or --force is set"
end
# handling bundle clean upgrade path from the pre's
@@ -371,4 +371,27 @@ describe "bundle clean" do
sys_exec "gem list"
out.should include("foo (1.0.1, 1.0)")
end
+
+ it "cleans system gems when --force is used" do
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ gem "foo"
+ gem "rack"
+ G
+ bundle :install
+
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ gem "rack"
+ G
+ bundle :install
+ bundle "clean --force"
+
+ out.should eq("Removing foo (1.0)")
+ sys_exec "gem list"
+ out.should_not include("foo (1.0)")
+ out.should include("rack (1.0.0)")
+ end
end