Skip to content

Instantly share code, notes, and snippets.

@chucai
Forked from jferris/new.rb
Created July 11, 2012 01:44
Show Gist options
  • Save chucai/3087418 to your computer and use it in GitHub Desktop.
Save chucai/3087418 to your computer and use it in GitHub Desktop.
Rails: FactoryGirl defined
FactoryGirl.define do
sequence :email do |n|
"user#{n}@example.com"
end
factory :user do
email
password "test"
aliased_as :author
end
factory :post do
author
title "A post"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment