diff options
author | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2018-06-14 18:35:04 +0900 |
---|---|---|
committer | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2018-06-15 16:33:27 +0900 |
commit | e314dd139b6e99417accb710dd0465f961e1b9d9 (patch) | |
tree | 0636d12f8067f352077b0a2ae7180cb75dd4999f /spec/install/failure_spec.rb | |
parent | 9e1a70e72f9556886442041b39adeb2e8ef587ab (diff) | |
download | bundler-e314dd139b6e99417accb710dd0465f961e1b9d9.tar.gz |
Modify localhost variable when defining URI::File. It will be provided from Ruby 2.6.
Diffstat (limited to 'spec/install/failure_spec.rb')
-rw-r--r-- | spec/install/failure_spec.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/install/failure_spec.rb b/spec/install/failure_spec.rb index 588bd96ee2..626a019166 100644 --- a/spec/install/failure_spec.rb +++ b/spec/install/failure_spec.rb @@ -18,7 +18,7 @@ RSpec.describe "bundle install" do source "file:\/\/localhost#{gem_repo2}" gem "rails" G - expect(last_command.bundler_err).to end_with(<<-M.strip) + msg = <<-M.strip An error occurred while installing activesupport (2.3.2), and Bundler cannot continue. Make sure that `gem install activesupport -v '2.3.2' --source 'file://localhost#{gem_repo2}/'` succeeds before bundling. @@ -27,6 +27,8 @@ In Gemfile: actionmailer was resolved to 2.3.2, which depends on activesupport M + msg = msg.gsub(%r{file:\/\/localhost}, "file://") if defined?(URI::File) + expect(last_command.bundler_err).to end_with(msg) end context "when installing a git gem" do @@ -111,7 +113,7 @@ In Gemfile: gem "rails" end G - expect(last_command.bundler_err).to end_with(<<-M.strip) + msg = <<-M.strip An error occurred while installing activesupport (2.3.2), and Bundler cannot continue. Make sure that `gem install activesupport -v '2.3.2' --source 'file://localhost#{gem_repo2}/'` succeeds before bundling. @@ -120,6 +122,8 @@ In Gemfile: actionmailer was resolved to 2.3.2, which depends on activesupport M + msg = msg.gsub(%r{file:\/\/localhost}, "file://") if defined?(URI::File) + expect(last_command.bundler_err).to end_with(msg) end context "because the downloaded .gem was invalid" do |