Method: Ccls::FactoryTestHelper#create_hx_interview_study_subject

Defined in:
lib/ccls_engine/factory_test_helper.rb

#create_hx_interview_study_subject(options = {}) ⇒ Object

../ccls_engine/test/unit/ccls/study_subject_interviews_test.rb ../homex/test/functional/interview/study_subjects_controller_test.rb



63
64
65
66
67
68
69
70
71
72
73
# File 'lib/ccls_engine/factory_test_helper.rb', line 63

def create_hx_interview_study_subject(options={})
  study_subject = create_hx_study_subject
  instrument = Factory(:instrument, 
    :project => Project.find_or_create_by_key('HomeExposures'))
  instrument_version = Factory(:instrument_version, 
    :instrument => instrument)
  interview = Factory(:interview, 
    :study_subject => study_subject,
    :instrument_version => instrument_version)
  study_subject
end