0 notes &
Writing Good Factories
I really wanted to remember what Pratik had to say about writing good factories in his Rails Summit talk so I’m putting it up here as a reference.
- Should be able to loop
10.times { Factory(:user) }- No associations in the base Factory
Factory(:user) and Factory(:user_with_items)- Should pass validations