Spec-style Tests by Default

41 views
Skip to first unread message

ch...@adadevelopersacademy.org

unread,
Mar 7, 2017, 9:35:10 PM3/7/17
to minitest-rails
Is there a way to set Minitest-Rails to generate spec-style tests by default?

Tad Thorley

unread,
Mar 9, 2017, 2:32:18 AM3/9/17
to minitest-rails

Mike Moore

unread,
Mar 9, 2017, 12:54:10 PM3/9/17
to minites...@googlegroups.com
> On Mar 7, 2017, at 7:35 PM, ch...@adadevelopersacademy.org wrote:
>
> Is there a way to set Minitest-Rails to generate spec-style tests by default?

The 3.0 gems should use the spec DSL by default.

Eustáquio Rangel

unread,
Mar 10, 2017, 5:36:03 PM3/10/17
to minitest-rails
Em terça-feira, 7 de março de 2017 23:35:10 UTC-3, ch...@adadevelopersacademy.org escreveu:
Is there a way to set Minitest-Rails to generate spec-style tests by default?

Put this on some initializer:

config.generators do |g|
   g.test_framework :minitest, spec: true
end


ch...@adadevelopersacademy.org

unread,
Mar 10, 2017, 5:48:43 PM3/10/17
to minitest-rails
@Eustáquio

Thanks it won't do spec by default without that (even for Gem 3.0).  I was just hoping for a shortcut, but I'll roll with this.  

Eustáquio Rangel

unread,
Mar 10, 2017, 6:15:08 PM3/10/17
to minitest-rails

Em sexta-feira, 10 de março de 2017 19:48:43 UTC-3, ch...@adadevelopersacademy.org escreveu:
@Eustáquio

Thanks it won't do spec by default without that (even for Gem 3.0).  I was just hoping for a shortcut, but I'll roll with this.  

You're welcome.
Reply all
Reply to author
Forward
0 new messages