diff options
| author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2026-02-13 13:53:57 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2026-02-13 05:29:05 +0000 |
| commit | 00440871dbe648cf7f8e2ebc2f01d3b1e0024cd6 (patch) | |
| tree | 350a8f6093282a83a045c08bde6bdfa3362037d0 /spec/bundler/commands | |
| parent | e064d0d92518209329297cb756f22a2287efd25a (diff) | |
[ruby/rubygems] Relax gem name validation to warn on capital letters
https://github.com/ruby/rubygems/commit/26dab848c5
Diffstat (limited to 'spec/bundler/commands')
| -rw-r--r-- | spec/bundler/commands/newgem_spec.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/bundler/commands/newgem_spec.rb b/spec/bundler/commands/newgem_spec.rb index 32f5e790af..26e27968b3 100644 --- a/spec/bundler/commands/newgem_spec.rb +++ b/spec/bundler/commands/newgem_spec.rb @@ -1982,9 +1982,17 @@ Usage: "bundle gem NAME [OPTIONS]" it { expect(err).to include("Invalid gem name #{subject}") } end + context "starting with a number" do + subject { "1gem" } + it { expect(err).to include("Invalid gem name #{subject}") } + end + context "including capital letter" do subject { "CAPITAL" } - it { expect(err).to include("Invalid gem name #{subject}") } + it "should warn but not error" do + expect(err).to include("Gem names with capital letters are not recommended") + expect(bundled_app("#{subject}/#{subject}.gemspec")).to exist + end end context "starting with an existing const name" do |
