diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-05-06 18:06:21 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-08-03 09:29:55 +0900 |
commit | c3ddd47ce7b546530e2241b0ea6a96817977886a (patch) | |
tree | 46515c479773d7add25773b536009e096ee9fa78 /spec/bundler/commands/add_spec.rb | |
parent | d8d5e16305ee071f7cf16980788cabcc44799c2e (diff) |
[bundler/bundler] Normalize file:// handling in specs
https://github.com/bundler/bundler/commit/5946d62ad0
Diffstat (limited to 'spec/bundler/commands/add_spec.rb')
-rw-r--r-- | spec/bundler/commands/add_spec.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/bundler/commands/add_spec.rb b/spec/bundler/commands/add_spec.rb index f5b3f49bb1..947dfbcfaa 100644 --- a/spec/bundler/commands/add_spec.rb +++ b/spec/bundler/commands/add_spec.rb @@ -14,7 +14,7 @@ RSpec.describe "bundle add" do build_git "foo", "2.0" install_gemfile <<-G - source "file://#{gem_repo2}" + source "#{file_uri_for(gem_repo2)}" gem "weakling", "~> 0.0.1" G end @@ -84,9 +84,9 @@ RSpec.describe "bundle add" do describe "with --source" do it "adds dependency with specified source" do - bundle "add 'foo' --source='file://#{gem_repo2}'" + bundle "add 'foo' --source='#{file_uri_for(gem_repo2)}'" - expect(bundled_app("Gemfile").read).to match(%r{gem "foo", "~> 2.0", :source => "file:\/\/#{gem_repo2}"}) + expect(bundled_app("Gemfile").read).to match(/gem "foo", "~> 2.0", :source => "#{file_uri_for(gem_repo2)}"/) expect(the_bundle).to include_gems "foo 2.0" end end @@ -123,8 +123,8 @@ RSpec.describe "bundle add" do end it "using combination of short form options works like long form" do - bundle "add 'foo' -s='file://#{gem_repo2}' -g='development' -v='~>1.0'" - expect(bundled_app("Gemfile").read).to include %(gem "foo", "~> 1.0", :group => :development, :source => "file://#{gem_repo2}") + bundle "add 'foo' -s='#{file_uri_for(gem_repo2)}' -g='development' -v='~>1.0'" + expect(bundled_app("Gemfile").read).to include %(gem "foo", "~> 1.0", :group => :development, :source => "#{file_uri_for(gem_repo2)}") expect(the_bundle).to include_gems "foo 1.1" end @@ -137,7 +137,7 @@ RSpec.describe "bundle add" do bundle "add 'werk_it'" expect(err).to match("Could not find gem 'werk_it' in") - bundle "add 'werk_it' -s='file://#{gem_repo2}'" + bundle "add 'werk_it' -s='#{file_uri_for(gem_repo2)}'" expect(err).to match("Could not find gem 'werk_it' in rubygems repository") end @@ -200,7 +200,7 @@ RSpec.describe "bundle add" do describe "when a gem is added which is already specified in Gemfile with version" do it "shows an error when added with different version requirement" do install_gemfile <<-G - source "file://#{gem_repo2}" + source "#{file_uri_for(gem_repo2)}" gem "rack", "1.0" G @@ -212,7 +212,7 @@ RSpec.describe "bundle add" do it "shows error when added without version requirements" do install_gemfile <<-G - source "file://#{gem_repo2}" + source "#{file_uri_for(gem_repo2)}" gem "rack", "1.0" G @@ -227,7 +227,7 @@ RSpec.describe "bundle add" do describe "when a gem is added which is already specified in Gemfile without version" do it "shows an error when added with different version requirement" do install_gemfile <<-G - source "file://#{gem_repo2}" + source "#{file_uri_for(gem_repo2)}" gem "rack" G |