summaryrefslogtreecommitdiff
path: root/spec/bundler/commands/inject_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/bundler/commands/inject_spec.rb')
-rw-r--r--spec/bundler/commands/inject_spec.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/spec/bundler/commands/inject_spec.rb b/spec/bundler/commands/inject_spec.rb
index dd0f1348cc..6c1994b59d 100644
--- a/spec/bundler/commands/inject_spec.rb
+++ b/spec/bundler/commands/inject_spec.rb
@@ -1,7 +1,6 @@
# frozen_string_literal: true
-require "spec_helper"
-RSpec.describe "bundle inject" do
+RSpec.describe "bundle inject", :bundler => "< 2" do
before :each do
gemfile <<-G
source "file://#{gem_repo1}"
@@ -80,7 +79,11 @@ Usage: "bundle inject GEM VERSION"
context "when frozen" do
before do
bundle "install"
- bundle "config --local frozen 1"
+ if Bundler.feature_flag.bundler_2_mode?
+ bundle! "config --local deployment true"
+ else
+ bundle! "config --local frozen true"
+ end
end
it "injects anyway" do
@@ -97,7 +100,7 @@ Usage: "bundle inject GEM VERSION"
it "restores frozen afterwards" do
bundle "inject 'rack-obama' '> 0'"
config = YAML.load(bundled_app(".bundle/config").read)
- expect(config["BUNDLE_FROZEN"]).to eq("1")
+ expect(config["BUNDLE_DEPLOYMENT"] || config["BUNDLE_FROZEN"]).to eq("true")
end
it "doesn't allow Gemfile changes" do