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
I've been bitten a few times recently by accidentally defining two factories with the same name. Factory_girl accepts this silently. I think an error is warranted: I can't think of a scenario where users are benefited by this ability and doing it inadvertently is likely to break things.
I've been bitten a few times recently by accidentally defining two factories with the same name. Factory_girl accepts this silently. I think an error is warranted: I can't think of a scenario where users are benefited by this ability and doing it inadvertently is likely to break things.
Here's my implementation. Attempting to define a second factory with the same name raises a DuplicateDefinitionError:
http://github.com/r00k/factory_girl/tree/disallow_duplicate_factory_definitions
The text was updated successfully, but these errors were encountered: