diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-03-01 12:27:02 +0100 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-03-12 10:15:42 +0100 |
commit | f05c1621913301451e2b4b3ea88c274e772c356e (patch) | |
tree | f71ad884d528645c6ce6184b976cc5de006035af /spec/other | |
parent | 47afeab8ab7f06e177508f04486a9c26869abe00 (diff) | |
download | bundler-f05c1621913301451e2b4b3ea88c274e772c356e.tar.gz |
Extract a common variable to a `let`
Diffstat (limited to 'spec/other')
-rw-r--r-- | spec/other/major_deprecation_spec.rb | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb index 550808103f..be79ee2db9 100644 --- a/spec/other/major_deprecation_spec.rb +++ b/spec/other/major_deprecation_spec.rb @@ -170,6 +170,15 @@ RSpec.describe "major deprecations" do end xdescribe Bundler::Dsl do + let(:msg) do + <<-EOS +The :github git source is deprecated, and will be removed in Bundler 2.0. Change any "reponame" :github sources to "username/reponame". Add this code to the top of your Gemfile to ensure it continues to work: + + git_source(:github) {|repo_name| "https://github.com/\#{repo_name}.git" } + + EOS + end + before do @rubygems = double("rubygems") allow(Bundler::Source::Rubygems).to receive(:new) { @rubygems } @@ -177,24 +186,12 @@ RSpec.describe "major deprecations" do context "with github gems" do it "warns about the https change" do - msg = <<-EOS -The :github git source is deprecated, and will be removed in Bundler 2.0. Change any "reponame" :github sources to "username/reponame". Add this code to the top of your Gemfile to ensure it continues to work: - - git_source(:github) {|repo_name| "https://github.com/\#{repo_name}.git" } - - EOS expect(Bundler::SharedHelpers).to receive(:major_deprecation).with(2, msg) subject.gem("sparks", :github => "indirect/sparks") end it "upgrades to https on request" do Bundler.settings.temporary "github.https" => true - msg = <<-EOS -The :github git source is deprecated, and will be removed in Bundler 2.0. Change any "reponame" :github sources to "username/reponame". Add this code to the top of your Gemfile to ensure it continues to work: - - git_source(:github) {|repo_name| "https://github.com/\#{repo_name}.git" } - - EOS expect(Bundler::SharedHelpers).to receive(:major_deprecation).with(2, msg) expect(Bundler::SharedHelpers).to receive(:major_deprecation).with(2, "The `github.https` setting will be removed") subject.gem("sparks", :github => "indirect/sparks") |