Skip to content

Instantly share code, notes, and snippets.

@bhauman
Created February 15, 2010 00:51
Show Gist options
  • Save bhauman/304361 to your computer and use it in GitHub Desktop.
Save bhauman/304361 to your computer and use it in GitHub Desktop.
Factory.define :business_user, :parent => :user do |i|
def i.build_some_outlets
(1..5).collect {|x| Factory.build(:outlet_without_user) }
end
i.outlets { i.build_some_outlets }
i.sequence(:name) {|n| "Business User #{n}" }
i.is_business true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment