← Back to Upcase

Understanding when to use factory girls method

(Kingsley Silas Chijioke) #1

I still have not understood where I am to use only this particular type of factory girls method. Like is the create and build method specifically for models? Is attributes_for meant for controllers spec?
Can anyone clear this up…thanks.

(Andy Waite) #2

This posts cover the various methods:

and there’s a weekly iteration episode:


attributes_for isn’t strictly for controller specs, it simply returns a hash, but that’s where I’ve used it in the past.

(Kingsley Silas Chijioke) #3

Thanks for the links and for clearing things up.