From 77bec15c937a98d4d863c4a857d5619b41e529f1 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Sat, 4 Feb 2023 15:22:13 +0900 Subject: [PATCH] [rubygems/rubygems] Properly load the generated gemspec The previous code loads bundler's gemspec which does not include the generated gemspec file, and thus the test was passing where it should indeed fail. With this change, the test properly fails now. https://github.com/rubygems/rubygems/commit/2098ea0d75 --- spec/bundler/commands/newgem_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/bundler/commands/newgem_spec.rb b/spec/bundler/commands/newgem_spec.rb index 5827f7380c..081e16944f 100644 --- a/spec/bundler/commands/newgem_spec.rb +++ b/spec/bundler/commands/newgem_spec.rb @@ -633,7 +633,7 @@ RSpec.describe "bundle gem" do it "does not include the gemspec file in files" do bundle "gem #{gem_name}" - bundler_gemspec = Bundler::GemHelper.new(gemspec_dir).gemspec + bundler_gemspec = Bundler::GemHelper.new(bundled_app(gem_name), gem_name).gemspec expect(bundler_gemspec.files).not_to include("#{gem_name}.gemspec") end