Skip to content

Instantly share code, notes, and snippets.

@thiagovsk
Created February 13, 2014 15:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thiagovsk/8977685 to your computer and use it in GitHub Desktop.
Save thiagovsk/8977685 to your computer and use it in GitHub Desktop.
# Read about factories at https://github.com/thoughtbot/factory_girl
FactoryGirl.define do
factory :user do |f|
f.name "Alessandro"
f.username "alessandrocb"
f.matricula "123456789"
f.password "123456789"
f.password_confirmation "123456789"
f.after(:create) {|user| user.add_role(:student)}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment