Skip to content

Latest commit

 

History

History
21 lines (17 loc) · 435 Bytes

override-the-initial-sequence-value.md

File metadata and controls

21 lines (17 loc) · 435 Bytes

Override The Initial Sequence Value

FactoryGirl sequences can be defined with an initial starting value

FactoryGirl.define do
  sequence :email, 1000 do |n|
    "person#{n}@example.com"
  end
end

thus:

> FactoryGirl.generate :email
=> "person1000@example.com"
> FactoryGirl.generate :email
=> "person1001@example.com"