如何通过捆绑器生成基于 'minitest/spec' 的宝石?
How to generate 'minitest/spec' based gems via bundler?
bundle gem gem_name --test=minitest
允许选择 minitest,但如何让打包器为 minitest/spec 而不是 minitest/test 生成代码。
目前不可能。
-t, --test=minitest, --test=rspec
Specify the test framework that Bundler should use when generating
the project. Acceptable values are minitest and rspec. The
GEM_NAME.gemspec will be configured and a skeleton test/spec
directory will be created based on this option. If this option is
unspecified, an interactive prompt will be displayed and the answer
will be saved in Bundler's global config for future bundle gem use.
但是 bundle gem
生成器生成的测试行少于 10 行,因此转换为 MiniTest::Spec
并不是一项艰巨的任务。
这似乎现在有效:
bundle gem myapp --test minitest
bundle gem gem_name --test=minitest
允许选择 minitest,但如何让打包器为 minitest/spec 而不是 minitest/test 生成代码。
目前不可能。
-t, --test=minitest, --test=rspec
Specify the test framework that Bundler should use when generating the project. Acceptable values are minitest and rspec. The GEM_NAME.gemspec will be configured and a skeleton test/spec directory will be created based on this option. If this option is unspecified, an interactive prompt will be displayed and the answer will be saved in Bundler's global config for future bundle gem use.
但是 bundle gem
生成器生成的测试行少于 10 行,因此转换为 MiniTest::Spec
并不是一项艰巨的任务。
这似乎现在有效:
bundle gem myapp --test minitest