From b9baa34673b96419410bd7c61d379bc8c89d798e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 4 Apr 2019 22:23:44 +0200 Subject: Move on to bundler 3 * Drop bundler 1 stuff from tests. * Move all feature flags to bundler 3 (like they are in 2-0-stable) and get them tested. --- spec/commands/inject_spec.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'spec/commands/inject_spec.rb') diff --git a/spec/commands/inject_spec.rb b/spec/commands/inject_spec.rb index 7ae0369955..da31849be7 100644 --- a/spec/commands/inject_spec.rb +++ b/spec/commands/inject_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe "bundle inject", :bundler => "< 2" do +RSpec.describe "bundle inject", :bundler => "< 3" do before :each do gemfile <<-G source "file://#{gem_repo1}" @@ -37,14 +37,14 @@ RSpec.describe "bundle inject", :bundler => "< 2" do context "with injected gems already in the Gemfile" do it "doesn't add existing gems" do bundle "inject 'rack' '> 0'" - expect(out).to match(/cannot specify the same gem twice/i) + expect(err).to match(/cannot specify the same gem twice/i) end end context "incorrect arguments" do it "fails when more than 2 arguments are passed" do bundle "inject gem_name 1 v" - expect(out).to eq(<<-E.strip) + expect(err).to eq(<<-E.strip) ERROR: "bundle inject" was called with arguments ["gem_name", "1", "v"] Usage: "bundle inject GEM VERSION" E @@ -79,7 +79,7 @@ Usage: "bundle inject GEM VERSION" context "when frozen" do before do bundle "install" - if Bundler.feature_flag.bundler_2_mode? + if Bundler.feature_flag.bundler_3_mode? bundle! "config set --local deployment true" else bundle! "config set --local frozen true" @@ -109,7 +109,7 @@ Usage: "bundle inject GEM VERSION" gem "rack-obama" G bundle "inject 'rack' '> 0'" - expect(out).to match(/trying to install in deployment mode after changing/) + expect(err).to match(/trying to install in deployment mode after changing/) expect(bundled_app("Gemfile.lock").read).not_to match(/rack-obama/) end -- cgit v1.2.1