dubstep
1
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?
S_Ahmed
2
–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]
S_Ahmed
3
How can I fix this now (my project is already created)?
S_Ahmed
4
Just remove the entire test directory.
Dheeraj K.
S_Ahmed
5
but future rails generators will create it again.
On Sun, Feb 12, 2012 at 11:57 AM, Dheeraj K.
S_Ahmed
7
Simple enough to fix.
open application.rb
find
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.