Skip to content

Instantly share code, notes, and snippets.

@Ch4s3
Created November 6, 2014 14:36
Show Gist options
  • Save Ch4s3/a29c78241b2db6814594 to your computer and use it in GitHub Desktop.
Save Ch4s3/a29c78241b2db6814594 to your computer and use it in GitHub Desktop.
FactoryGirl.define do
factory :user, class: "User::Doctor" do
sequence(:email) { |n| "user#{User.last.id + 1}@avhana.com" }
sequence(:username) { |n| "user#{User.last.id + 1}" }
password "password"
organization
emr "allscripts"
end
factory :root_user, parent: :user, class: "User::Root" do
end
factory :admin_user, parent: :user, class: "User::Admin" do
organization
end
factory :doctor, parent: :user, class: "User::Doctor" do
organization
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment