OSDN Git Service

add rspec-rails
[praisedb/praisedb.git] / vendor / plugins / rspec-rails / generators / rspec_model / USAGE
1 Description:
2     The rspec_model generator creates stubs for a new model.
3
4     The generator takes a model name as its argument.  The model name may be
5     given in CamelCase or under_score and should not be suffixed with 'Model'.
6
7     The generator creates a model class in app/models, an RSpec spec in
8     spec/models, database fixtures in spec/fixtures/plural_name.yml, and a migration
9     in db/migrate.
10
11 Example:
12     ./script/generate rspec_model Account
13
14     This will create an Account model:
15         Model:      app/models/account.rb
16         Spec:       spec/models/account_spec.rb
17         Fixtures:   spec/fixtures/accounts.yml
18         Migration:  db/migrate/XXX_add_accounts.rb