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/gems | |
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/gems')
-rw-r--r-- | spec/bundler/install/gems/compact_index_spec.rb | 1 | ||||
-rw-r--r-- | spec/bundler/install/gems/native_extensions_spec.rb | 4 | ||||
-rw-r--r-- | spec/bundler/install/gems/standalone_spec.rb | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/spec/bundler/install/gems/compact_index_spec.rb b/spec/bundler/install/gems/compact_index_spec.rb index 6257cf4f71..0cee69f702 100644 --- a/spec/bundler/install/gems/compact_index_spec.rb +++ b/spec/bundler/install/gems/compact_index_spec.rb @@ -930,6 +930,7 @@ Either installing with `--full-index` or running `bundle update rails` should fi it "does not duplicate specs in the lockfile when updating and a dependency is not installed" do install_gemfile <<-G, :artifice => "compact_index" + source "#{file_uri_for(gem_repo1)}" source "#{source_uri}" do gem "rails" gem "activemerchant" diff --git a/spec/bundler/install/gems/native_extensions_spec.rb b/spec/bundler/install/gems/native_extensions_spec.rb index 8a4de3cf92..d5cafcfc2c 100644 --- a/spec/bundler/install/gems/native_extensions_spec.rb +++ b/spec/bundler/install/gems/native_extensions_spec.rb @@ -78,6 +78,7 @@ RSpec.describe "installing a gem with native extensions", :ruby_repo do bundle "config set build.c_extension --with-c_extension=hello" install_gemfile <<-G + source "#{file_uri_for(gem_repo1)}" gem "c_extension", :git => #{lib_path("c_extension-1.0").to_s.dump} G @@ -126,11 +127,13 @@ RSpec.describe "installing a gem with native extensions", :ruby_repo do # 1st time, require only one gem -- only one of the extensions gets built. install_gemfile <<-G + source "#{file_uri_for(gem_repo1)}" gem "c_extension_one", :git => #{lib_path("gems").to_s.dump} G # 2nd time, require both gems -- we need both extensions to be built now. install_gemfile <<-G + source "#{file_uri_for(gem_repo1)}" gem "c_extension_one", :git => #{lib_path("gems").to_s.dump} gem "c_extension_two", :git => #{lib_path("gems").to_s.dump} G @@ -171,6 +174,7 @@ RSpec.describe "installing a gem with native extensions", :ruby_repo do bundle "config set build.c_extension --with-c_extension=hello --with-c_extension_bundle-dir=hola" install_gemfile <<-G + source "#{file_uri_for(gem_repo1)}" gem "c_extension", :git => #{lib_path("c_extension-1.0").to_s.dump} G diff --git a/spec/bundler/install/gems/standalone_spec.rb b/spec/bundler/install/gems/standalone_spec.rb index 08d5276a54..b3b9d4d46b 100644 --- a/spec/bundler/install/gems/standalone_spec.rb +++ b/spec/bundler/install/gems/standalone_spec.rb @@ -146,6 +146,7 @@ RSpec.shared_examples "bundle install --standalone" do end bundle "config set --local path #{bundled_app("bundle")}" install_gemfile <<-G, :standalone => true, :dir => cwd, :raise_on_error => false + source "#{file_uri_for(gem_repo1)}" gem "bar", :git => "#{lib_path("bar-1.0")}" G end |