Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# Read about factories at https://github.com/thoughtbot/factory_girl
FactoryGirl.define do
factory :user do
email: "john@doe.com"
factory :facilitator, :class => Facilitator do
sequence(:email) { |n| "facilitator#{n}@example.com" }
after(:build) { |pm| pm.company = FactoryGirl.build(:property_management_company) }
before(:create) { |pm| pm.company = FactoryGirl.create(:property_management_company) }
factory :property_manager_team_member, :class => PropertyManager do
admin false
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment