summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-20 18:48:15 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-08-31 19:06:14 +0900
commit9fc16a31d9a0800b46ae547acb7115a9c58f6c9f (patch)
tree96ac27dce1afe8b84931a220b684a17a791d1e9e /spec
parentd7c734a27e816992b592ebc586856a8a23b144fe (diff)
[rubygems/rubygems] Exclude gemspec file itself from gem
The processed YML data is included as metadata, the source gemspec file is unused and just confusing. https://github.com/rubygems/rubygems/commit/f444478eac
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4789
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/commands/newgem_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/bundler/commands/newgem_spec.rb b/spec/bundler/commands/newgem_spec.rb
index 56fea008ec..29d04e94d8 100644
--- a/spec/bundler/commands/newgem_spec.rb
+++ b/spec/bundler/commands/newgem_spec.rb
@@ -588,6 +588,14 @@ RSpec.describe "bundle gem" do
expect(bundled_app("#{gem_name}/lib/#{require_path}.rb").read).to match(/class Error < StandardError; end$/)
end
+ it "does not include the gemspec file in files" do
+ bundle "gem #{gem_name}"
+
+ bundler_gemspec = Bundler::GemHelper.new(gemspec_dir).gemspec
+
+ expect(bundler_gemspec.files).not_to include("#{gem_name}.gemspec")
+ end
+
it "runs rake without problems" do
bundle "gem #{gem_name}"