Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Change deploy specs to properly configure deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez committed Apr 4, 2019
1 parent be2a4d0 commit 18f5751
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions spec/install/deploy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,12 @@
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
Expand All @@ -334,7 +336,7 @@
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
Expand All @@ -344,7 +346,7 @@
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
Expand All @@ -354,7 +356,7 @@
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
Expand All @@ -364,7 +366,7 @@
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
Expand Down Expand Up @@ -412,7 +414,8 @@
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")
Expand Down

0 comments on commit 18f5751

Please sign in to comment.