mirror of
https://github.com/thoughtbot/factory_bot_rails.git
synced 2022-11-09 11:49:18 -05:00
Be more consistent with path formatting [skip ci]
This commit is contained in:
parent
ba7f5ef327
commit
e9d07ced60
1 changed files with 4 additions and 4 deletions
|
@ -53,8 +53,8 @@ test/factories/*.rb
|
||||||
spec/factories/*.rb
|
spec/factories/*.rb
|
||||||
```
|
```
|
||||||
|
|
||||||
You can configure by adding the following to "config/application.rb" or the
|
You can configure by adding the following to `config/application.rb` or the
|
||||||
appropriate environment configuration in "config/environments":
|
appropriate environment configuration in `config/environments`:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
config.factory_bot.definition_file_paths = ["custom/factories"]
|
config.factory_bot.definition_file_paths = ["custom/factories"]
|
||||||
|
@ -81,7 +81,7 @@ config.factory_bot.definition_file_paths = []
|
||||||
|
|
||||||
### Generators
|
### Generators
|
||||||
|
|
||||||
Including factory\_bot\_rails in the development group of your Gemfile,
|
Including factory\_bot\_rails in the development group of your Gemfile
|
||||||
will cause Rails to generate factories instead of fixtures.
|
will cause Rails to generate factories instead of fixtures.
|
||||||
If you want to disable this feature, you can either move factory\_bot\_rails out
|
If you want to disable this feature, you can either move factory\_bot\_rails out
|
||||||
of the development group of your Gemfile, or add the following configuration:
|
of the development group of your Gemfile, or add the following configuration:
|
||||||
|
@ -97,7 +97,7 @@ file (or `spec/factories.rb` if using rspec_rails), generated factories will be
|
||||||
inserted at the top of the existing file.
|
inserted at the top of the existing file.
|
||||||
Otherwise, factories will be generated in the
|
Otherwise, factories will be generated in the
|
||||||
`test/factories` directory (`spec/factories` if using rspec_rails),
|
`test/factories` directory (`spec/factories` if using rspec_rails),
|
||||||
in a file matching the name of the table (e.g. 'test/factories/users.rb').
|
in a file matching the name of the table (e.g. `test/factories/users.rb`).
|
||||||
|
|
||||||
To generate factories in a different directory, you can use the following
|
To generate factories in a different directory, you can use the following
|
||||||
configuration:
|
configuration:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue