= FactoryGirl(Company).create() val country = FactoryGirl(Country, 'countryyy).create() val factory = FactoryGirl(Member).withVariables('countryId -> country.id) val member = factory.create('companyId -> company1.id, 'createdAt -> DateTime.now) [ઃఆϑΝΠϧ] countryyy { name="Japan" } member { countryId="#{countryId}" } company { name="FactoryGirl, Inc." } ઃఆϑΝΠϧΛݩʹσʔλΛొɻ ඞཁʹԠͯ͡ςετΫϥεଆͰઃఆ͢Δ