summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2024-06-07 11:32:51 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2024-06-20 15:22:13 +0900
commit0610302a8fc2e2cab401e0afde36dcaffd841cd7 (patch)
tree273b51fe148a578e81a37c73a5434848c5c7c5cb /spec
parent758e01d39da4b84a9950ad1301af98010e27fbee (diff)
[rubygems/rubygems] Don't validate local gemspec twice
Calling `remote!` or `cached!` on the source was expiring local specs for now reason. It's unnecessary to override these methods for path sources since they only deal with local specifications. https://github.com/rubygems/rubygems/commit/aa93b196a2
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/install/gemspecs_spec.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/bundler/install/gemspecs_spec.rb b/spec/bundler/install/gemspecs_spec.rb
index 51aa0ed14f..420b34ca04 100644
--- a/spec/bundler/install/gemspecs_spec.rb
+++ b/spec/bundler/install/gemspecs_spec.rb
@@ -157,5 +157,25 @@ RSpec.describe "bundle install" do
expect(err).to include("but your Gemfile specified")
expect(exitstatus).to eq(18)
end
+
+ it "validates gemspecs just once when everything installed and lockfile up to date" do
+ build_lib "foo"
+
+ install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
+ gemspec path: "#{lib_path("foo-1.0")}"
+
+ module Monkey
+ def validate(spec)
+ puts "Validate called on \#{spec.full_name}"
+ end
+ end
+ Bundler.rubygems.extend(Monkey)
+ G
+
+ bundle "install"
+
+ expect(out).to include("Validate called on foo-1.0").once
+ end
end
end