summaryrefslogtreecommitdiff
path: root/lib/bundler/cli/gem.rb
diff options
context:
space:
mode:
authorYusuke Nakamura <[email protected]>2022-01-10 21:51:51 +0900
committergit <[email protected]>2022-01-20 01:04:52 +0900
commit4e955b2e379a550cebd27e5d66fd5bcd98c70cf7 (patch)
treeb71b8a0eca3e317b1ce1faae2c0deef42e5bc990 /lib/bundler/cli/gem.rb
parent5c4734d1eff9322f9f21d9c21577978ab6e0d044 (diff)
[rubygems/rubygems] Create minitest file to underscored path in "bundle gem" command
...with dashed gem name In "bundle gem" command with dashed name gem (e.g. foo-bar) generates `test/test_foo/bar.rb`, but this file contains undefined class `TestFoo` and moreover, does not include in "bundle exec rake test" target. Therefore, intentially the first test after gem created is fail, but in case of gem name contains dash character is not. The change doings... (when "bundle gem foo-bar" called) * create `test/test_foo_bar.rb` * define `TestFooBar` class in `test/test_foo_bar.rb` https://github.com/rubygems/rubygems/commit/5d9a69fc0f
Diffstat (limited to 'lib/bundler/cli/gem.rb')
-rw-r--r--lib/bundler/cli/gem.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb
index 31e3af5580..6174e40bc0 100644
--- a/lib/bundler/cli/gem.rb
+++ b/lib/bundler/cli/gem.rb
@@ -106,7 +106,7 @@ module Bundler
when "minitest"
templates.merge!(
"test/minitest/test_helper.rb.tt" => "test/test_helper.rb",
- "test/minitest/test_newgem.rb.tt" => "test/test_#{namespaced_path}.rb"
+ "test/minitest/test_newgem.rb.tt" => "test/test_#{underscored_name}.rb"
)
config[:test_task] = :test
when "test-unit"