If you are starting a new Rails project and you want to use RSpec and FactoryGirl instead of Test::Unit and Fixtures, it's easy to get Rails to recognize this and generate the correct files for you.
Create a new rails app without the test directory (or if the app already exists, just delete the test directory)
$ rails new myproject -T
Add the gems to the
:testgroups in your Gemfile
group :test, :development do gem 'rspec-rails' gem 'factory_girl_rails' end
That's it! Now when you generate your models and controllers using
$ rails g model my_model you will also get the spec and factory created for free.