4af9d592c5
I've followed the [upgrade guide](https://github.com/thoughtbot/factory_bot/blob/4-9-0-stable/UPGRADE_FROM_FACTORY_GIRL.md) and ran these two commands: ``` grep -e FactoryGirl **/*.rake **/*.rb -s -l | xargs sed -i "" "s|FactoryGirl|FactoryBot|" grep -e factory_girl **/*.rake **/*.rb -s -l | xargs sed -i "" "s|factory_girl|factory_bot|" ``` Signed-off-by: Rémy Coutable <remy@rymai.me>
12 lines
512 B
Ruby
12 lines
512 B
Ruby
FactoryBot.define do
|
|
sequence(:username) { |n| "user#{n}" }
|
|
sequence(:name) { |n| "John Doe#{n}" }
|
|
sequence(:email) { |n| "user#{n}@example.org" }
|
|
sequence(:email_alias) { |n| "user.alias#{n}@example.org" }
|
|
sequence(:title) { |n| "My title #{n}" }
|
|
sequence(:filename) { |n| "filename-#{n}.rb" }
|
|
sequence(:url) { |n| "http://example#{n}.org" }
|
|
sequence(:label_title) { |n| "label#{n}" }
|
|
sequence(:branch) { |n| "my-branch-#{n}" }
|
|
sequence(:past_time) { |n| 4.hours.ago + (2 * n).seconds }
|
|
end
|