Skip to content

Commit

Permalink
Document value of a sequence can be any Enumerable
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
aishek and Alexandr Borisov authored Jul 30, 2021
1 parent d85f90f commit 81aaf8d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions GETTING_STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 81aaf8d

Please sign in to comment.