diff options
Diffstat (limited to 'spec/bundler/commands/inject_spec.rb')
-rw-r--r-- | spec/bundler/commands/inject_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/bundler/commands/inject_spec.rb b/spec/bundler/commands/inject_spec.rb index 2d97bf6ff0..255a03c135 100644 --- a/spec/bundler/commands/inject_spec.rb +++ b/spec/bundler/commands/inject_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe "bundle inject", :bundler => "< 3" do +RSpec.describe "bundle inject", bundler: "< 3" do before :each do gemfile <<-G source "#{file_uri_for(gem_repo1)}" @@ -36,14 +36,14 @@ RSpec.describe "bundle inject", :bundler => "< 3" do context "with injected gems already in the Gemfile" do it "doesn't add existing gems" do - bundle "inject 'rack' '> 0'", :raise_on_error => false + bundle "inject 'rack' '> 0'", raise_on_error: false 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", :raise_on_error => false + bundle "inject gem_name 1 v", raise_on_error: false expect(err).to eq(<<-E.strip) ERROR: "bundle inject" was called with arguments ["gem_name", "1", "v"] Usage: "bundle inject GEM VERSION" @@ -99,7 +99,7 @@ Usage: "bundle inject GEM VERSION" it "restores frozen afterwards" do bundle "inject 'rack-obama' '> 0'" - config = YAML.load(bundled_app(".bundle/config").read) + config = Psych.load(bundled_app(".bundle/config").read) expect(config["BUNDLE_DEPLOYMENT"] || config["BUNDLE_FROZEN"]).to eq("true") end @@ -108,8 +108,8 @@ Usage: "bundle inject GEM VERSION" source "#{file_uri_for(gem_repo1)}" gem "rack-obama" G - bundle "inject 'rack' '> 0'", :raise_on_error => false - expect(err).to match(/trying to install in deployment mode after changing/) + bundle "inject 'rack' '> 0'", raise_on_error: false + expect(err).to match(/the lockfile can't be updated because frozen mode is set/) expect(bundled_app_lock.read).not_to match(/rack-obama/) end |