From e206e7369843b2a4987f7c521f43e491455947cc Mon Sep 17 00:00:00 2001 From: Tobias Preuss Date: Wed, 16 Apr 2014 12:33:02 +0200 Subject: [PATCH] Enable syntax highlighting for code snippets. --- README.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) 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