FactoryGirl.define do factory :global_resource do |u| sequence(:name) { |n| "global_resource#{n}" } description 'The Description' end factory :email_user , :parent => :user do email = :email end factory :other_named_user, :parent => :user do first_name 'Jane' last_name 'Doe' end factory :tuser, :parent => :user do last_login_ip '192.168.1.1' end factory :admin_user, :parent => :user do username 'admin' end end