1
0
Fork 0
mirror of https://github.com/thoughtbot/factory_bot_rails.git synced 2022-11-09 11:49:18 -05:00

Improve documentation around the fixture_replacement generator

This commit is contained in:
Joshua Clayton 2013-02-08 15:27:10 -05:00
parent f4bd6ace48
commit 2ab0ea4141

View file

@ -1,16 +1,16 @@
factory_girl [![Build Status](https://secure.travis-ci.org/thoughtbot/factory_girl_rails.png)](http://travis-ci.org/thoughtbot/factory_girl_rails?branch=master)
============
factory_girl is a fixtures replacement with a straightforward definition
`factory_girl` is a fixtures replacement with a straightforward definition
syntax, support for multiple build strategies (saved instances, unsaved
instances, attribute hashes, and stubbed objects), and support for multiple
factories for the same class (user, admin_user, and so on), including factory
factories for the same class (`user`, `admin_user`, and so on), including factory
inheritance.
Rails
-----
factory_girl_rails provides Rails integration for factory_girl. All
`factory_girl_rails` provides Rails integration for `factory_girl`. All
Rails-specific features are only compatible with Rails 3.
Currently, automatic factory definition loading is the only Rails-specific feature.
@ -27,7 +27,7 @@ Gem:
Configuration
-------------
Add factory_girl_rails to your Gemfile:
Add `factory_girl_rails` to your Gemfile:
gem 'factory_girl_rails'
@ -38,15 +38,13 @@ of fixtures, add the following to your application.rb file:
g.fixture_replacement :factory_girl
end
If you use `factory_girl` for fixture replacement, ensure that
`factory_girl_rails` is available in the development group. If it's not, Rails
will generate standard yml files instead of factory files.
`fixture_replacement :factory_girl` takes an option `:suffix => 'some_suffix'`
to generate factories as "modelname_some_suffix.rb"
Cucumber Integration
--------------------
factory_girl ships with step definitions for Cucumber integration. For more information, see the GETTING_STARTED file in the factory_girl repo.
More Information
----------------