Question

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.

Était-ce utile?

La solution

Run this instead:

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

This makes the model generator skip creating the rSpec files.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top