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

Enable syntax highlighting for code snippets.

This commit is contained in:
Tobias Preuss 2014-04-16 12:33:02 +02:00
parent 24da5ef283
commit e206e73698

View file

@ -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