diff options
author | Daniel Niknam <mhmd.niknam@gmail.com> | 2021-07-25 01:27:02 +1000 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-07-27 09:25:57 +0900 |
commit | 2f9e0cf1819b8679abe79494f622e1a42d7e021d (patch) | |
tree | 6ea1693b78ff3769dde6f7c5a24d2547c26f755e /spec/bundler/cache/gems_spec.rb | |
parent | b500e8fab445d5a4ad91fd71e622aff88d0c7dd6 (diff) |
[rubygems/rubygems] Explicitly define a global source for tests
This is in preparation for deprecating source-less gemfiles.
https://github.com/rubygems/rubygems/commit/d6493fa3e2
Diffstat (limited to 'spec/bundler/cache/gems_spec.rb')
-rw-r--r-- | spec/bundler/cache/gems_spec.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/bundler/cache/gems_spec.rb b/spec/bundler/cache/gems_spec.rb index 161ec64218..72e372fb41 100644 --- a/spec/bundler/cache/gems_spec.rb +++ b/spec/bundler/cache/gems_spec.rb @@ -4,6 +4,7 @@ RSpec.describe "bundle cache" do shared_examples_for "when there are only gemsources" do before :each do gemfile <<-G + source "#{file_uri_for(gem_repo1)}" gem 'rack' G @@ -39,6 +40,7 @@ RSpec.describe "bundle cache" do end install_gemfile <<-G + source "#{file_uri_for(gem_repo1)}" gem "rack" G @@ -49,6 +51,7 @@ RSpec.describe "bundle cache" do system_gems "rack-1.0.0", :path => default_bundle_path gemfile <<-G + source "#{file_uri_for(gem_repo1)}" gem "rack" G @@ -64,6 +67,7 @@ RSpec.describe "bundle cache" do cache_gems "rack-1.0.0" gemfile <<-G + source "#{file_uri_for(gem_repo1)}" gem "rack" G @@ -100,7 +104,7 @@ RSpec.describe "bundle cache" do it "uses builtin gems when installing to system gems" do bundle "config set path.system true" - install_gemfile %(gem 'builtin_gem', '1.0.2') + install_gemfile %(source "#{file_uri_for(gem_repo1)}"; gem 'builtin_gem', '1.0.2') expect(the_bundle).to include_gems("builtin_gem 1.0.2") end @@ -134,6 +138,7 @@ RSpec.describe "bundle cache" do bundle "config set path.system true" install_gemfile <<-G + source "#{file_uri_for(gem_repo1)}" gem 'builtin_gem', '1.0.2' G @@ -302,6 +307,7 @@ RSpec.describe "bundle cache" do :path => bundled_app("vendor/cache") install_gemfile <<-G + source "#{file_uri_for(gem_repo1)}" gem "foo-bundler" G |