class FactoryBot::Decorator::DisallowsDuplicatesRegistry
def register(name, item)
def register(name, item) if registered?(name) raise DuplicateDefinitionError, "#{@component.name} already registered: #{name}" else @component.register(name, item) end end