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/install/gemfile/eval_gemfile_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/install/gemfile/eval_gemfile_spec.rb')
-rw-r--r-- | spec/bundler/install/gemfile/eval_gemfile_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/bundler/install/gemfile/eval_gemfile_spec.rb b/spec/bundler/install/gemfile/eval_gemfile_spec.rb index 8303e6284e..02283291b4 100644 --- a/spec/bundler/install/gemfile/eval_gemfile_spec.rb +++ b/spec/bundler/install/gemfile/eval_gemfile_spec.rb @@ -11,12 +11,14 @@ RSpec.describe "bundle install with gemfile that uses eval_gemfile" do context "eval-ed Gemfile points to an internal gemspec" do before do create_file "Gemfile-other", <<-G + source "#{file_uri_for(gem_repo1)}" gemspec :path => 'gems/gunks' G end it "installs the gemspec specified gem" do install_gemfile <<-G + source "#{file_uri_for(gem_repo1)}" eval_gemfile 'Gemfile-other' G expect(out).to include("Resolving dependencies") @@ -35,6 +37,8 @@ RSpec.describe "bundle install with gemfile that uses eval_gemfile" do end create_file bundled_app("gems/Gemfile"), <<-G + source "#{file_uri_for(gem_repo2)}" + gemspec :path => "\#{__dir__}/gunks" source "#{file_uri_for(gem_repo2)}" do @@ -62,10 +66,12 @@ RSpec.describe "bundle install with gemfile that uses eval_gemfile" do before do build_lib("a", :path => bundled_app("gems/a")) create_file bundled_app("nested/Gemfile-nested"), <<-G + source "#{file_uri_for(gem_repo1)}" gem "a", :path => "../gems/a" G gemfile <<-G + source "#{file_uri_for(gem_repo1)}" eval_gemfile "nested/Gemfile-nested" G end @@ -89,6 +95,7 @@ RSpec.describe "bundle install with gemfile that uses eval_gemfile" do it "installs the gemspec specified gem" do install_gemfile <<-G + source "#{file_uri_for(gem_repo1)}" eval_gemfile 'other/Gemfile-other' gemspec :path => 'gems/gunks' G |