Skip to content

Instantly share code, notes, and snippets.

@sandro
Created February 3, 2009 18:40
Show Gist options
  • Save sandro/57663 to your computer and use it in GitHub Desktop.
Save sandro/57663 to your computer and use it in GitHub Desktop.
Factory.define :administrator_base, :class => Administrator do |a|
a.password 'abc123'
a.password_confirmation 'abc123'
a.security_question_id 1
a.security_question_answer 'xxxxxx'
a.activated_at Time.now
a.state 'active'
end
Factory.define :administrator do |a|
Factory.attributes_for(:administrator_base).each do |k,v|
a.add_attribute k,v
end
a.first_name "Joe"
a.last_name "Boe"
a.email {"#{random_string}@thomsonreuters.com"}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment