DFE-Digital / rails-template

Rails 7 template with GOV.UK Frontend
27 stars 5 forks source link

add rspec to development env in Gemfile #20

Closed misaka closed 1 year ago

misaka commented 1 year ago

Otherwise, rspec isn't available in the development environment, causing 'rails generate' to create unit tests instead of rspecs. This change ensures it creates rspecs.

For example, generating a model before this change (note test_unit used):

~/Code/apply-for-a-juggling-licence$ rails generate model juggler
      invoke  active_record
      create    db/migrate/20221220145746_create_jugglers.rb
      create    app/models/juggler.rb
      invoke    test_unit
      create      test/models/juggler_test.rb
      create      test/fixtures/jugglers.yml

And generating a model with this change (note rspec used):

~/Code/apply-for-a-juggling-licence$ rails generate model juggler
      invoke  active_record
      create    db/migrate/20221220145908_create_jugglers.rb
      create    app/models/juggler.rb
      invoke    rspec
      create      spec/models/juggler_spec.rb