From ee73d0b1a8e42b190ff8a514b26e12c5df6d9836 Mon Sep 17 00:00:00 2001 From: Terence Lee Date: Sun, 18 Sep 2011 03:31:24 -0700 Subject: add --force to bundle clean, thanks @ebeigarts --- spec/other/clean_spec.rb | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'spec') 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 -- cgit v1.2.1