Skip to content

Instantly share code, notes, and snippets.

@dgmcguire
Last active August 29, 2015 14:16
Show Gist options
  • Save dgmcguire/390ebafa78ae89cf25ce to your computer and use it in GitHub Desktop.
Save dgmcguire/390ebafa78ae89cf25ce to your computer and use it in GitHub Desktop.
1 | Kenyatta Sporer | allan@prosaccohodkiewicz.net
2 | Kenyatta Sporer | allan@prosaccohodkiewicz.net
3 | Kenyatta Sporer | allan@prosaccohodkiewicz.net
4 | Kenyatta Sporer | allan@prosaccohodkiewicz.net
5 | Kenyatta Sporer | allan@prosaccohodkiewicz.net
6 | Kenyatta Sporer | allan@prosaccohodkiewicz.net
7 | Jimmie Cassin | dedrick@heel.name
8 | Jimmie Cassin | dedrick@heel.name
9 | Jimmie Cassin | dedrick@heel.name
10 | Jimmie Cassin | dedrick@heel.name
11 | Jimmie Cassin | dedrick@heel.name
12 | Jimmie Cassin | dedrick@heel.name
13 | Juana Lowe | sylvester_mcglynn@little.info
14 | Juana Lowe | sylvester_mcglynn@little.info
15 | Juana Lowe | sylvester_mcglynn@little.info
16 | Juana Lowe | sylvester_mcglynn@little.info
17 | Juana Lowe | sylvester_mcglynn@little.info
18 | Juana Lowe | sylvester_mcglynn@little.info
require 'factory_girl'
FactoryGirl.find_definitions
require 'sequel'
DB = Sequel.postgres('college_sucks')
user_table = DB[:users]
proc = Proc.new { |obj| FactoryGirl.attributes_for(:user) }
(0..5).each do |i|
user_table.insert(proc.call(:user))
end
require 'faker'
Dir.glob('./app/lib/models/*.rb').each { |file| require file }
FactoryGirl.define do
factory :user do
name Faker::Name.name
email Faker::Internet.email
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment