summaryrefslogtreecommitdiff
path: root/spec/other/clean_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/other/clean_spec.rb')
-rw-r--r--spec/other/clean_spec.rb30
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/other/clean_spec.rb b/spec/other/clean_spec.rb
index 6c8328502f..393902ba08 100644
--- a/spec/other/clean_spec.rb
+++ b/spec/other/clean_spec.rb
@@ -559,4 +559,34 @@ describe "bundle clean" do
expect(vendored_gems("bin/rackup")).to exist
end
+
+ it "doesn't store dry run as a config setting" do
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ gem "thin"
+ gem "foo"
+ G
+
+ bundle "install --path vendor/bundle --no-clean"
+ bundle "config dry_run false"
+
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ gem "thin"
+ G
+
+ bundle :install
+
+ bundle "clean"
+
+ expect(out).to eq("Removing foo (1.0)")
+ expect(out).not_to eq("Would have removed foo (1.0)")
+
+ should_have_gems 'thin-1.0', 'rack-1.0.0'
+ should_not_have_gems 'foo-1.0'
+
+ expect(vendored_gems("bin/rackup")).to exist
+ end
end