Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## factories.rb
- Factory.define :user do |u|
- u.username "godinaa"
- u.enabled true
- u.roles {|factory| [factory.association(:role)]}
- end
- ## example
- 5.times do |i|
- Factory.create :user, :username => "user_#{i}"
- end
Add Comment
Please, Sign In to add comment