summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/bundler/commands/cache_spec.rb18
1 files changed, 8 insertions, 10 deletions
diff --git a/spec/bundler/commands/cache_spec.rb b/spec/bundler/commands/cache_spec.rb
index 973cf5add5..db5ec9cf21 100644
--- a/spec/bundler/commands/cache_spec.rb
+++ b/spec/bundler/commands/cache_spec.rb
@@ -292,6 +292,10 @@ RSpec.describe "bundle cache" do
context "with frozen configured" do
before do
+ bundle "config set --local frozen true"
+ end
+
+ it "tries to install but fails when the lockfile is out of sync" do
gemfile <<-G
source "https://gem.repo1"
gem "myrack"
@@ -301,29 +305,23 @@ RSpec.describe "bundle cache" do
remote: https://gem.repo1/
specs:
myrack (1.0.0)
+ myrack-obama (1.0)
+ myrack
PLATFORMS
#{lockfile_platforms}
DEPENDENCIES
myrack
+ myrack-obama
BUNDLED WITH
#{Bundler::VERSION}
L
- bundle "config set --local frozen true"
- end
-
- it "tries to install with frozen" do
- gemfile <<-G
- source "https://gem.repo1"
- gem "myrack"
- gem "myrack-obama"
- G
bundle :cache, raise_on_error: false
expect(exitstatus).to eq(16)
expect(err).to include("frozen mode")
- expect(err).to include("You have added to the Gemfile")
+ expect(err).to include("You have deleted from the Gemfile")
expect(err).to include("* myrack-obama")
bundle "env"
expect(out).to include("frozen")