I'm Mo
I'm Mo

Reputation: 131

How to generate 'minitest/spec' based gems via bundler?

bundle gem gem_name --test=minitest

allows for choosing minitest, but how to make bundler generate code for minitest/spec instead of minitest/test.

Upvotes: 1

Views: 422

Answers (2)

Mikael Kessler
Mikael Kessler

Reputation: 1235

This seems to work now:

bundle gem myapp --test minitest

Upvotes: 1

max
max

Reputation: 102222

It is not currently possible.

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

However the bundle gem generator generates less than 10 lines of tests, so converting to MiniTest::Spec is hardly a herculean task.

Upvotes: 0

Related Questions