summaryrefslogtreecommitdiff
path: root/spec/install/deploy_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/install/deploy_spec.rb')
-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)}"