You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you just do email Forgery(:internet).email_address the email address is generated once when the factory is loaded. When you use the block form email { Forgery(:internet).email_address } the email is generated every time the factory is used to build an object. This still won't guarantee uniqueness, though, so I recommend you use sequences. They're much faster for testing as well.
When used with FactoryGirl, i.e.
and you attempt to create records:
will return five records with the same e-mail address. This creates a problem if the model validates the uniqueness of the e-mail address.
The text was updated successfully, but these errors were encountered: