2017-10-20 15:20:28 -04:00
|
|
|
module FactoryBot
|
2012-02-08 09:45:07 -05:00
|
|
|
# Raised when a factory is defined that attempts to instantiate itself.
|
|
|
|
class AssociationDefinitionError < RuntimeError; end
|
|
|
|
|
|
|
|
# Raised when a callback is defined that has an invalid name
|
|
|
|
class InvalidCallbackNameError < RuntimeError; end
|
|
|
|
|
|
|
|
# Raised when a factory is defined with the same name as a previously-defined factory.
|
|
|
|
class DuplicateDefinitionError < RuntimeError; end
|
|
|
|
|
2012-03-09 17:45:42 -05:00
|
|
|
# Raised when attempting to register a sequence from a dynamic attribute block
|
2012-02-08 09:45:07 -05:00
|
|
|
class SequenceAbuseError < RuntimeError; end
|
|
|
|
|
2018-09-28 16:36:07 -04:00
|
|
|
# Raised when defining an attribute twice in the same factory
|
2012-02-08 09:45:07 -05:00
|
|
|
class AttributeDefinitionError < RuntimeError; end
|
2013-04-26 10:33:48 -04:00
|
|
|
|
|
|
|
# Raised when a method is defined in a factory or trait with arguments
|
|
|
|
class MethodDefinitionError < RuntimeError; end
|
2014-02-07 10:09:20 -05:00
|
|
|
|
|
|
|
# Raised when any factory is considered invalid
|
|
|
|
class InvalidFactoryError < RuntimeError; end
|
2012-02-08 09:45:07 -05:00
|
|
|
end
|