summaryrefslogtreecommitdiff
path: root/spec/commands/clean_spec.rb
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-07-10 08:45:00 -0500
committerSamuel Giddins <segiddins@segiddins.me>2017-07-19 13:10:39 -0500
commitaec2780f59caf6070752fc7ceda1470cf1faf496 (patch)
tree0dd4b90e4073c4e42d3d60e11646c60216deaa41 /spec/commands/clean_spec.rb
parent6b9defe6a5c3a83f13d2f45e2166d7198ae28486 (diff)
downloadbundler-aec2780f59caf6070752fc7ceda1470cf1faf496.tar.gz
Set forgotten command line options via config in 2.0
Diffstat (limited to 'spec/commands/clean_spec.rb')
-rw-r--r--spec/commands/clean_spec.rb58
1 files changed, 28 insertions, 30 deletions
diff --git a/spec/commands/clean_spec.rb b/spec/commands/clean_spec.rb
index 3f3dc8565d..dcdb4bfaa3 100644
--- a/spec/commands/clean_spec.rb
+++ b/spec/commands/clean_spec.rb
@@ -25,16 +25,16 @@ RSpec.describe "bundle clean" do
gem "foo"
G
- bundle "install --path vendor/bundle --no-clean"
+ bundle! "install", forgotten_command_line_options(:path => "vendor/bundle", :clean => false)
gemfile <<-G
source "file://#{gem_repo1}"
gem "thin"
G
- bundle "install"
+ bundle! "install"
- bundle :clean
+ bundle! :clean
expect(out).to include("Removing foo (1.0)")
@@ -52,7 +52,7 @@ RSpec.describe "bundle clean" do
gem "foo"
G
- bundle "install --path vendor/bundle --no-clean"
+ bundle "install", forgotten_command_line_options(:path => "vendor/bundle", :clean => false)
gemfile <<-G
source "file://#{gem_repo1}"
@@ -80,7 +80,7 @@ RSpec.describe "bundle clean" do
gem "foo"
G
- bundle! "install --path vendor/bundle --no-clean"
+ bundle! "install", forgotten_command_line_options(:path => "vendor/bundle", :clean => false)
gemfile <<-G
source "file://#{gem_repo1}"
@@ -111,8 +111,8 @@ RSpec.describe "bundle clean" do
end
G
- bundle "install --path vendor/bundle"
- bundle "install --without test_group"
+ bundle "install", forgotten_command_line_options(:path => "vendor/bundle")
+ bundle "install", forgotten_command_line_options(:without => "test_group")
bundle :clean
expect(out).to include("Removing rack (1.0.0)")
@@ -137,7 +137,7 @@ RSpec.describe "bundle clean" do
end
G
- bundle "install --path vendor/bundle"
+ bundle "install", forgotten_command_line_options(:path => "vendor/bundle")
bundle :clean
@@ -159,7 +159,7 @@ RSpec.describe "bundle clean" do
end
G
- bundle "install --path vendor/bundle"
+ bundle "install", forgotten_command_line_options(:path => "vendor/bundle")
gemfile <<-G
source "file://#{gem_repo1}"
@@ -195,7 +195,7 @@ RSpec.describe "bundle clean" do
end
G
- bundle! "install --path vendor/bundle"
+ bundle! "install", forgotten_command_line_options(:path => "vendor/bundle")
update_git "foo", :path => lib_path("foo-bar")
revision2 = revision_for(lib_path("foo-bar"))
@@ -225,7 +225,7 @@ RSpec.describe "bundle clean" do
gem "activesupport", :git => "#{lib_path("rails")}", :ref => '#{revision}'
G
- bundle "install --path vendor/bundle"
+ bundle "install", forgotten_command_line_options(:path => "vendor/bundle")
bundle :clean
expect(out).to include("")
@@ -247,7 +247,7 @@ RSpec.describe "bundle clean" do
end
end
G
- bundle "install --path vendor/bundle --without test"
+ bundle "install", forgotten_command_line_options(:path => "vendor/bundle", :without => "test")
bundle :clean
@@ -268,7 +268,7 @@ RSpec.describe "bundle clean" do
end
G
- bundle "install --path vendor/bundle --without development"
+ bundle "install", forgotten_command_line_options(:path => "vendor/bundle", :without => "development")
bundle :clean
expect(exitstatus).to eq(0) if exitstatus
@@ -283,7 +283,7 @@ RSpec.describe "bundle clean" do
bundle :clean
- expect(exitstatus).to eq(1) if exitstatus
+ expect(exitstatus).to eq(15) if exitstatus
expect(out).to include("--force")
end
@@ -296,7 +296,7 @@ RSpec.describe "bundle clean" do
gem "foo"
G
- bundle "install --path vendor/bundle"
+ bundle "install", forgotten_command_line_options(:path => "vendor/bundle")
gemfile <<-G
source "file://#{gem_repo1}"
@@ -345,7 +345,7 @@ RSpec.describe "bundle clean" do
gem "thin"
gem "rack"
G
- bundle "install --path vendor/bundle --clean"
+ bundle "install", forgotten_command_line_options(:path => "vendor/bundle", :clean => true)
gemfile <<-G
source "file://#{gem_repo1}"
@@ -366,7 +366,7 @@ RSpec.describe "bundle clean" do
gem "foo"
G
- bundle! "install --path vendor/bundle --clean"
+ bundle! "install", forgotten_command_line_options(:path => "vendor/bundle", :clean => true)
update_repo2 do
build_gem "foo", "1.0.1"
@@ -385,7 +385,7 @@ RSpec.describe "bundle clean" do
gem "thin"
gem "rack"
G
- bundle "install --path vendor/bundle"
+ bundle "install", forgotten_command_line_options(:path => "vendor/bundle")
gemfile <<-G
source "file://#{gem_repo1}"
@@ -405,7 +405,7 @@ RSpec.describe "bundle clean" do
gem "foo"
G
- bundle! "install --path vendor/bundle"
+ bundle! "install", forgotten_command_line_options(:path => "vendor/bundle")
update_repo2 do
build_gem "foo", "1.0.1"
@@ -501,7 +501,7 @@ RSpec.describe "bundle clean" do
gem "foo", :git => "#{lib_path("foo-1.0")}"
G
- bundle "install --path vendor/bundle"
+ bundle "install", forgotten_command_line_options(:path => "vendor/bundle")
# mimic 7 length git revisions in Gemfile.lock
gemfile_lock = File.read(bundled_app("Gemfile.lock")).split("\n")
@@ -512,7 +512,7 @@ RSpec.describe "bundle clean" do
file.print gemfile_lock.join("\n")
end
- bundle "install --path vendor/bundle"
+ bundle "install", forgotten_command_line_options(:path => "vendor/bundle")
bundle :clean
@@ -560,10 +560,8 @@ RSpec.describe "bundle clean" do
gem "bar", "1.0", :path => "#{relative_path}"
G
- bundle "install --path vendor/bundle"
- bundle :clean
-
- expect(exitstatus).to eq(0) if exitstatus
+ bundle "install", forgotten_command_line_options(:path => "vendor/bundle")
+ bundle! :clean
end
it "doesn't remove gems in dry-run mode with path set" do
@@ -574,7 +572,7 @@ RSpec.describe "bundle clean" do
gem "foo"
G
- bundle "install --path vendor/bundle --no-clean"
+ bundle "install", forgotten_command_line_options(:path => "vendor/bundle", :clean => false)
gemfile <<-G
source "file://#{gem_repo1}"
@@ -602,7 +600,7 @@ RSpec.describe "bundle clean" do
gem "foo"
G
- bundle "install --path vendor/bundle --no-clean"
+ bundle "install", forgotten_command_line_options(:path => "vendor/bundle", :clean => false)
gemfile <<-G
source "file://#{gem_repo1}"
@@ -632,7 +630,7 @@ RSpec.describe "bundle clean" do
gem "foo"
G
- bundle "install --path vendor/bundle --no-clean"
+ bundle "install", forgotten_command_line_options(:path => "vendor/bundle", :clean => false)
bundle "config dry_run false"
gemfile <<-G
@@ -662,7 +660,7 @@ RSpec.describe "bundle clean" do
gem "foo"
G
- bundle "install --path vendor/bundle --no-clean"
+ bundle "install", forgotten_command_line_options(:path => "vendor/bundle", :clean => false)
gemfile <<-G
source "file://#{gem_repo1}"
@@ -689,7 +687,7 @@ RSpec.describe "bundle clean" do
gem "very_simple_git_binary", :git => "#{lib_path("very_simple_git_binary-1.0")}", :ref => "#{revision}"
G
- bundle! "install --path vendor/bundle"
+ bundle! "install", forgotten_command_line_options(:path => "vendor/bundle")
expect(vendored_gems("bundler/gems/extensions")).to exist
expect(vendored_gems("bundler/gems/very_simple_git_binary-1.0-#{revision[0..11]}")).to exist