ruby - What is the best way to assign nil to a default association? -


so if have factory such (address factory) , want create test creates person no address

require 'faker'  factorygirl.define   factory :person     address     first        { faker::name.first_name }     last         { faker::name.last_name }   end end 

i expect following work (but doesn't):

create(:person, address: nil)

what best way set properly?


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -