1
bundle gem gem_name --test=minitest

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

I'm Mo
  • 131
  • 8

2 Answers2

1

This seems to work now:

bundle gem myapp --test minitest

Mikael Kessler
  • 1,235
  • 1
  • 15
  • 27
0

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.

max
  • 96,212
  • 14
  • 104
  • 165
  • I wonder why they prefer rspec over minitest/spec! as minitest/spec is packaged with ruby itself – I'm Mo Oct 07 '16 at 19:08
  • RSpec has been around much longer and is more popular. Oh yeah and the docs dont suck. – max Oct 08 '16 at 01:41