[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
This commit is contained in:
Akira Matsuda 2023-02-04 15:22:13 +09:00 committed by git
parent 21dcf5d766
commit 77bec15c93

View File

@ -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