Domanda

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.

È stato utile?

Soluzione

Run this instead:

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

This makes the model generator skip creating the rSpec files.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top