diff options
author | hiren mistry <hiren.mistry@chai-monsters.com> | 2016-10-04 22:06:14 -0700 |
---|---|---|
committer | hiren mistry <hiren.mistry@chai-monsters.com> | 2016-10-04 22:24:05 -0700 |
commit | fca76d30dec6c1d3c0cc5459333901240c81deb4 (patch) | |
tree | 213dbe509d6cc7242fa54e66b0d6922505f88dd5 /spec/commands | |
parent | d77c5c671475dc1b2ec9ed44e9988bbe6b999b29 (diff) | |
download | bundler-fca76d30dec6c1d3c0cc5459333901240c81deb4.tar.gz |
Changed the behavior of 'bundle clean --dry-run' to output the list of gems bundle without having the local path set or providing the '--force' option. This change does not affect the actual behavior of 'bundle clean' which requires either the path being set or use of '--force'.
Diffstat (limited to 'spec/commands')
-rw-r--r-- | spec/commands/clean_spec.rb | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/spec/commands/clean_spec.rb b/spec/commands/clean_spec.rb index 72d422c3..acec0eef 100644 --- a/spec/commands/clean_spec.rb +++ b/spec/commands/clean_spec.rb @@ -567,7 +567,7 @@ describe "bundle clean" do expect(exitstatus).to eq(0) if exitstatus end - it "doesn't remove gems in dry-run mode" do + it "doesn't remove gems in dry-run mode with path set" do gemfile <<-G source "file://#{gem_repo1}" @@ -595,6 +595,36 @@ describe "bundle clean" do expect(vendored_gems("bin/rackup")).to exist end + it "doesn't remove gems in dry-run mode with no path set" do + gemfile <<-G + source "file://#{gem_repo1}" + + gem "thin" + gem "foo" + G + + bundle "install --path vendor/bundle --no-clean" + + gemfile <<-G + source "file://#{gem_repo1}" + + gem "thin" + G + + bundle :install + + bundle "configuration --delete path" + + bundle "clean --dry-run" + + expect(out).not_to include("Removing foo (1.0)") + expect(out).to include("Would have removed foo (1.0)") + + should_have_gems "thin-1.0", "rack-1.0.0", "foo-1.0" + + 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}" |