summaryrefslogtreecommitdiff
path: root/spec/bundler/cache
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2022-06-30 11:55:15 +0200
committergit <svn-admin@ruby-lang.org>2022-07-02 19:41:02 +0900
commit7b78aba53aa0b34800bfd96e9e278258d2a890c8 (patch)
tree31ba912b9f385a48e927d745f7fdae7d2ea98307 /spec/bundler/cache
parent9101269e948d838c916ea8342b8e6edce2e0957c (diff)
[rubygems/rubygems] Account for default gems not having remote when caching
https://github.com/rubygems/rubygems/commit/b93d4de2ff
Diffstat (limited to 'spec/bundler/cache')
-rw-r--r--spec/bundler/cache/gems_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/bundler/cache/gems_spec.rb b/spec/bundler/cache/gems_spec.rb
index a8382a5d8c..63c00eba01 100644
--- a/spec/bundler/cache/gems_spec.rb
+++ b/spec/bundler/cache/gems_spec.rb
@@ -118,6 +118,18 @@ RSpec.describe "bundle cache" do
expect(bundled_app("vendor/cache/json-#{default_json_version}.gem")).to exist
end
+ it "caches builtin gems when cache_all_platforms is set" do
+ gemfile <<-G
+ source "#{file_uri_for(gem_repo2)}"
+ gem "json"
+ G
+
+ bundle "config set cache_all_platforms true"
+
+ bundle :cache
+ expect(bundled_app("vendor/cache/json-#{default_json_version}.gem")).to exist
+ end
+
it "doesn't make remote request after caching the gem" do
build_gem "builtin_gem_2", "1.0.2", :path => bundled_app("vendor/cache") do |s|
s.summary = "This builtin_gem is bundled with Ruby"