Generators
Spec::Rails contains generators that you can use to generate models and RESTful controllers
in a similar fashion to Rails’ builtin generators. The only difference is that they generate specs instead
of tests and fixtures will be put under the spec folder. Example:
ruby script/generate rspec_scaffold purchase order_id:integer created_at:datetime amount:decimal
or
ruby script/generate rspec_model person
or
ruby script/generate rspec_controller person
For more information on each generator, just run them without any arguments.