16 lines
381 B
Ruby
16 lines
381 B
Ruby
require 'faker'
|
|
FactoryGirl.define do
|
|
factory :project do
|
|
name { Faker::Name.title }
|
|
sequence(:content){ |n| "This is project content#{n}"}
|
|
|
|
after(:build) do |project|
|
|
3.times { project.users << FactoryGirl.create(:user_with_sequence_number) }
|
|
end
|
|
|
|
factory :project_name_length_gt_20 do
|
|
name { Faker::Internet.password(51, 51) }
|
|
end
|
|
end
|
|
end
|