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?

–no-test-framework is not a valid option. You need to specify -T
or --skip-test-unit when creating a new project.

2012/2/12 S Ahmed [email protected]

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

Just remove the entire test directory.

Dheeraj K.

but future rails generators will create it again.

On Sun, Feb 12, 2012 at 11:57 AM, Dheeraj K.

I’m using rspec

Sent from my iPhone

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 K.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs