diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-03-21 11:05:25 +0100 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-04-11 13:16:45 +0200 |
commit | e4b07bdca7a98453487b2dc012ce8d841857c34b (patch) | |
tree | 869189dc399ce3aa7c06ad4a900a2fa5e5e0d118 | |
parent | a6533c0fe6541cc929f895ee0b7a9b673d34cb4d (diff) | |
download | bundler-e4b07bdca7a98453487b2dc012ce8d841857c34b.tar.gz |
Change deploy specs to properly configure deployment
-rw-r--r-- | spec/install/deploy_spec.rb | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/spec/install/deploy_spec.rb b/spec/install/deploy_spec.rb index 1a5fd573ae..21d7ba3294 100644 --- a/spec/install/deploy_spec.rb +++ b/spec/install/deploy_spec.rb @@ -322,10 +322,12 @@ RSpec.describe "install with --deployment or --frozen" do DEPENDENCIES rack G + + bundle! "config set deployment true" end it "prevents the replace by default" do - bundle :install, forgotten_command_line_options(:deployment => true) + bundle :install expect(err).to match(/The list of sources changed/) end @@ -334,7 +336,7 @@ RSpec.describe "install with --deployment or --frozen" do before { bundle! "config set allow_deployment_source_credential_changes true" } it "allows the replace" do - bundle :install, forgotten_command_line_options(:deployment => true) + bundle :install expect(out).to match(/#{success_message}/) end @@ -344,7 +346,7 @@ RSpec.describe "install with --deployment or --frozen" do before { bundle! "config set allow_deployment_source_credential_changes false" } it "prevents the replace" do - bundle :install, forgotten_command_line_options(:deployment => true) + bundle :install expect(err).to match(/The list of sources changed/) end @@ -354,7 +356,7 @@ RSpec.describe "install with --deployment or --frozen" do before { ENV["BUNDLE_ALLOW_DEPLOYMENT_SOURCE_CREDENTIAL_CHANGES"] = "true" } it "allows the replace" do - bundle :install, forgotten_command_line_options(:deployment => true) + bundle :install expect(out).to match(/#{success_message}/) end @@ -364,7 +366,7 @@ RSpec.describe "install with --deployment or --frozen" do before { ENV["BUNDLE_ALLOW_DEPLOYMENT_SOURCE_CREDENTIAL_CHANGES"] = "false" } it "prevents the replace" do - bundle :install, forgotten_command_line_options(:deployment => true) + bundle :install expect(err).to match(/The list of sources changed/) end @@ -412,7 +414,8 @@ You have deleted from the Gemfile: expect(out).to include("Updating files in vendor/cache") simulate_new_machine - bundle! "install --verbose", forgotten_command_line_options(:deployment => true) + bundle! "config set deployment true" + bundle! "install --verbose" expect(out).not_to include("You are trying to install in deployment mode after changing your Gemfile") expect(out).not_to include("You have added to the Gemfile") expect(out).not_to include("You have deleted from the Gemfile") |