How can I tell Rails to use RSpec instead of test-unit when creating a new Rails app?

后端 未结 5 576
遥遥无期
遥遥无期 2021-01-29 20:51

I have test-unit installed and rspec installed (along with -core, -expectations, -mocks and -rails

5条回答
  •  -上瘾入骨i
    2021-01-29 21:21

    The following should work:

    at command line:

    rails new MYAPP -T # The -T option tells rails not to include Test::Unit
    

    in Gemfile:

    gem 'rspec-rails'
    

    at command line:

    bundle install
    rails g rspec:install
    

提交回复
热议问题