new project with --no-test-framework, but when creating a model it invoked test_unit

I created a new project using:

rails new abc --no-test-framework -d mysql

Now when creating a model I showed:

create app/models/account.rb

invoke test_unit

create test/unit/account_test.rb

create test/fixtures/accounts.yml

I am using rspec, and ran rspec install and cucumbers install.

Why is it still creating test_unit related files?

How can I fix this now (my project is already created)?

Just remove the entire test directory.

Dheeraj Kumar

but future rails generators will create it again.

Simple enough to fix.

open application.rb


require ‘rails/all’

replace with

Pick the frameworks you want:

require “active_record/railtie”

require “action_controller/railtie”

require “action_mailer/railtie”

require “active_resource/railtie”

require “sprockets/railtie”

require “rails/test_unit/railtie”

I have a question, though. Why skip writing unit tests? That’s not a good practice.

Dheeraj Kumar

I’m using rspec