Skip to content

Instantly share code, notes, and snippets.

@mgswolf
Created June 26, 2013 00:31
Show Gist options
  • Save mgswolf/5863748 to your computer and use it in GitHub Desktop.
Save mgswolf/5863748 to your computer and use it in GitHub Desktop.
require 'faker'
puts '---Cleaning DataBase --'
[User].map(&:delete_all)
#admin
puts '---Creating Admin user ---'
User.create!(email: '[email protected]', password: 'taskpass', name: 'Admin Tasks')
#normal users
puts '---Creating Normal Users---'
users = []
10.times do
name = Faker::Name.name
users << FactoryGirl.create(:user, {
name: name,
email: Faker::Internet.email(name),
})
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment