Skip to content

Instantly share code, notes, and snippets.

@noel
Created June 30, 2011 22:13
Show Gist options
  • Save noel/1057407 to your computer and use it in GitHub Desktop.
Save noel/1057407 to your computer and use it in GitHub Desktop.
factory.rb
require 'factory_girl'
Factory.define :role do |r|
r.name 'SuperAdmin'
end
Factory.define :user do |u|
u.username "gomezn"
u.association :roles, :factory => :role
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment