문제

When I issue this command

rails generate model  page title:string

I get

  invoke  active_record
   create    db/migrate/20140507190336_create_pages.rb
   create    app/models/page.rb
   invoke    rspec
   create      spec/models/page_spec.rb

Sometimes, we dont want tests. How can I tell the rails generate commmand to skip model tests.

도움이 되었습니까?

해결책

Run this instead:

rails generate model  page title:string --no-test-framework

This makes the model generator skip creating the rSpec files.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top