diff --git a/README.md b/README.md index 5517a21..b32af1a 100644 --- a/README.md +++ b/README.md @@ -29,22 +29,28 @@ Configuration Add `factory_girl_rails` to your Gemfile: - gem 'factory_girl_rails' +```ruby +gem 'factory_girl_rails' +``` Generators for factories will automatically substitute fixture (and maybe any other `fixture_replacement` you set). If you want to disable this feature, add the following to your application.rb file: - config.generators do |g| - g.factory_girl false - end +```ruby +config.generators do |g| + g.factory_girl false +end +``` Default factories directory is `test/factories`, or `spec/factories` if `test_framework` generator is set to `:rspec`; change this behavior with: - config.generators do |g| - g.factory_girl dir: 'custom/dir/for/factories' - end +```ruby +config.generators do |g| + g.factory_girl dir: 'custom/dir/for/factories' +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