Skip to content

Commit

Permalink
Update the sequence documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaclayton committed Jun 27, 2011
1 parent f33a64e commit 71dacea
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions GETTING_STARTED.md
Expand Up @@ -190,6 +190,18 @@ a particular factory:
sequence(:email) {|n| "person#{n}@example.com" }
end

You can also override the initial value:

factory :user do
sequence(:email, 1000) {|n| "person#{n}@example.com" }
end

Without a block, the value will increment itself, starting at its initial value:

factory :post do
sequence(:position)
end

Callbacks
---------

Expand Down

0 comments on commit 71dacea

Please sign in to comment.