rosa-build/spec/factories/user_factory.rb

16 lines
368 B
Ruby

# -*- encoding : utf-8 -*-
FactoryGirl.define do
factory :user do
email { FactoryGirl.generate(:email) }
name { FactoryGirl.generate(:string) }
uname { FactoryGirl.generate(:uname) }
password '123456'
password_confirmation {|u| u.password}
confirmed_at { Time.now.utc }
end
factory :admin, :parent => :user do
role 'admin'
end
end