mirror of
https://github.com/thoughtbot/factory_bot.git
synced 2022-11-09 11:43:51 -05:00
Document value of a sequence can be any Enumerable
* Update GETTING_STARTED.md with mention Array#cycle * Update GETTING_STARTED.md by move Array#cycle mention * Remove unused TOC entry for GETTING_STARTED.md Co-authored-by: Alexandr Borisov <ab@cifronomika.ru>
This commit is contained in:
parent
d85f90fb16
commit
81aaf8d7f4
1 changed files with 9 additions and 0 deletions
|
@ -1013,6 +1013,15 @@ factory :post do
|
|||
end
|
||||
```
|
||||
|
||||
Please note, that the value for the sequence could be any Enumerable instance,
|
||||
as long as it responds to `#next`:
|
||||
|
||||
```ruby
|
||||
factory :task do
|
||||
sequence :priority, %i[low medium high urgent].cycle
|
||||
end
|
||||
```
|
||||
|
||||
### Aliases
|
||||
|
||||
Sequences can also have aliases. The sequence aliases share the same counter:
|
||||
|
|
Loading…
Reference in a new issue