-
-
Save emilevictor/a376231cf11345b35e1b to your computer and use it in GitHub Desktop.
sites.rb
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
# Read about factories at https://github.com/thoughtbot/factory_girl | |
FactoryGirl.define do | |
factory :site, class: 'Site' do | |
name "MyString" | |
organisation_category nil | |
service_type_organisation_category_id 1 | |
telephone "MyString" | |
fax "MyString" | |
email "MyString" | |
url "MyString" | |
clinical_software_package_id 1 | |
billing_software_package_id 1 | |
bulk_billing false | |
disabled_access false | |
ncacch false | |
parking false | |
organisation nil | |
factory :site_with_addresses do | |
ignore do | |
addresses_count 1 | |
end | |
before(:create) do |site, evaluator| | |
FactoryGirl.create_list(:site_address, evaluator.addresses_count, addressee: site) | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment