rails g model GiftProduct -p --migration=false --fixture=false
i tried this code,and it reduce some generate file but still can't find how to avoid unit test file genertate,
in fact i only want 开发者_JS百科a model file
i'm new on rail3,hope someone could help me below is the generate result
invoke active_record
create app/models/gift_product.rb
invoke test_unit
create test/unit/gift_product_test.rb
Works in Rails 3.2:
rails g model Foo --no-test-framework
try this
rails g model project --no-tests --no-fixtures --no-migrations
I'm not only R3 yest so I'm not sure
You could try setting the test framework to nil
or any non-existent test framework.
rails g model Test -t nil
Outputs
invoke active_record
create db/migrate/20101102025557_create_tests.rb
create app/models/test.rb
error nil [not found]
Admittedly, not the nicest or most correct way of doing it, but it works.
精彩评论