summaryrefslogtreecommitdiff
path: root/spec/install
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-12-23 22:19:31 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-12-31 15:56:52 +0100
commit4d263d5087c3ccf54649ac2a10ba96cd0245e7b0 (patch)
treeffd80c47968df2e770dd1b6e8aa6555eb60c1639 /spec/install
parent4b1c59ee641287e0932a856cb5cece121856376e (diff)
downloadbundler-4d263d5087c3ccf54649ac2a10ba96cd0245e7b0.tar.gz
Unify deployment setting and flagimprove_deployment_flag
Previously, we were recommending `bundle config deployment true; bundle install` as an alternative to `bundle install --deployment`, but they were not working equally.
Diffstat (limited to 'spec/install')
-rw-r--r--spec/install/deploy_spec.rb15
1 files changed, 14 insertions, 1 deletions
diff --git a/spec/install/deploy_spec.rb b/spec/install/deploy_spec.rb
index f31257fac3..f92a531bf5 100644
--- a/spec/install/deploy_spec.rb
+++ b/spec/install/deploy_spec.rb
@@ -106,7 +106,7 @@ RSpec.describe "install with --deployment or --frozen" do
context "when replacing a host with the same host with credentials" do
before do
- bundle! "install"
+ bundle! "install", forgotten_command_line_options(:path => "vendor/bundle")
gemfile <<-G
source "http://user_name:password@localgemserver.test/"
gem "rack"
@@ -278,6 +278,19 @@ RSpec.describe "install with --deployment or --frozen" do
expect(err).not_to include("You have changed in the Gemfile")
end
+ it "installs gems by default to vendor/bundle when `--deployment` is set via an environment variable", :bundler => "< 3" do
+ ENV["BUNDLE_DEPLOYMENT"] = "true"
+ bundle "install"
+ expect(out).to include("vendor/bundle")
+ end
+
+ it "installs gems to custom path when deployment mode is set via an environment variable ", :bundler => "< 3" do
+ ENV["BUNDLE_DEPLOYMENT"] = "true"
+ ENV["BUNDLE_PATH"] = "vendor/bundle2"
+ bundle "install"
+ expect(out).to include("vendor/bundle2")
+ end
+
it "can have --frozen set to false via an environment variable" do
gemfile <<-G
source "#{file_uri_for(gem_repo1)}"