Created
October 2, 2009 19:50
-
-
Save ajsharp/200044 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# visit.rb | |
Factory.define :visit do |f| | |
f.patient { |a| a.association(:patient) } | |
f.clinic { |a| a.association(:clinic) } | |
end | |
# patient.rb | |
# Defines a new sequence | |
Factory.sequence :email do |n| | |
"person#{n}@example.com" | |
end | |
Factory.define :patient do |f| | |
f.name "Patient Name" | |
f.email { Factory.next(:email) } | |
end | |
# clinic.rb | |
Factory.define :clinic do |f| | |
f.attribute_name "attribute value" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment