From 79edb8c2cf6bff5ef90d302990bd500ac617149c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 14 Mar 2019 12:05:50 +0100 Subject: Remove the `have_major_deprecation` matcher With the `have_major_deprecation` matcher as it was, if a command printed no deprecations, the expectation ``` expect(err).to have_major_deprecation("anything") ``` would actually succeed! Instead, do something as readable, but simpler. --- spec/install/gemfile/sources_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'spec/install') diff --git a/spec/install/gemfile/sources_spec.rb b/spec/install/gemfile/sources_spec.rb index f9e5d072bf..2ab1f29de5 100644 --- a/spec/install/gemfile/sources_spec.rb +++ b/spec/install/gemfile/sources_spec.rb @@ -30,7 +30,7 @@ RSpec.describe "bundle install with gems on multiple sources" do xit "shows a deprecation" do bundle :install - expect(err).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.") + expect(deprecations).to include("Your Gemfile contains multiple primary sources.") end it "warns about ambiguous gems, but installs anyway, prioritizing sources last to first" do @@ -64,7 +64,7 @@ RSpec.describe "bundle install with gems on multiple sources" do end xit "shows a deprecation" do - expect(err).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.") + expect(deprecations).to include("Your Gemfile contains multiple primary sources.") end it "warns about ambiguous gems, but installs anyway" do @@ -257,7 +257,7 @@ RSpec.describe "bundle install with gems on multiple sources" do end xit "shows a deprecation" do - expect(err).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.") + expect(deprecations).to include("Your Gemfile contains multiple primary sources.") end it "installs from the other source and warns about ambiguous gems" do -- cgit v1.2.1