look at this
Factory.define :user do |f|
f.sequence(:username) { |n| "user#{n}" }
f.sequence(:email) { |n| "test#...@example.com " }
f.association :company
f.password "password"
f.password_confirmation { |u| u.password }
f.sequence(:name) { |n| "test#{n}" }
f.sequence(:last_name) { |
radhames brito wrote:
> fixtures are hard to maintain and impractical comprared to factories,
> factories are pluging/gems that create object dinamicly as needed so
> you
> can do thing like this
>
> i have 100 users
>
> with that the factory will create on the fly 100 users and you can later
>
2 matches
Mail list logo