factory_bot: improve some headings

This commit is contained in:
Rico Sta. Cruz 2017-10-30 00:17:08 +08:00
parent 9c1c638048
commit a432023f17
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
1 changed files with 5 additions and 3 deletions

View File

@ -38,15 +38,17 @@ See: [Defining factories](http://www.rubydoc.info/gems/factory_bot/file/GETTING_
### Extra options
#### Custom class names
```ruby
# Custom class names
factory :user, class: 'User' do
···
end
```
#### Aliases
```ruby
# Aliases
factory :user, aliases: [:author] do
···
end
@ -94,7 +96,7 @@ end
```
{: data-line="2,3"}
or:
#### or
```ruby
factory :post do