Sha256: edf93603fbfcbdec6c953543e31999c715de2c9489b0b4feb1f4a4395313a9f0
Contents?: true
Size: 592 Bytes
Versions: 95
Compression:
Stored size: 592 Bytes
Contents
# frozen_string_literal: true FactoryBot.define do sequence :gp_code do |n| "G" + n.to_s.rjust(7, "0") end factory :primary_care_physician, class: "Renalware::Patients::PrimaryCarePhysician" do name { "GOOD PJ" } telephone { "0203593082" } code { generate(:gp_code) } practitioner_type { "GP" } # ensures addressable_type and addressable_id work is assigned, using # FactoryBot's simple assoc method does not work # before(:create) do |primary_care_physician| primary_care_physician.build_address(attributes_for(:address)) end end end
Version data entries
95 entries across 95 versions & 1 rubygems