Sha256: 28378f30bec768d55df7321f0766f110b8fe5954d567c739ea3a69b27fe1c151

Contents?: true

Size: 333 Bytes

Versions: 58

Compression:

Stored size: 333 Bytes

Contents

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

Version data entries

58 entries across 46 versions & 11 rubygems

Version Path
ffactory_girl-4.8.2 lib/factory_girl/decorator/disallows_duplicates_registry.rb
factory_girl-4.9.0 lib/factory_girl/decorator/disallows_duplicates_registry.rb
ffactory_girl-4.8.1 lib/factory_girl/decorator/disallows_duplicates_registry.rb
factory_girl-4.8.1 lib/factory_girl/decorator/disallows_duplicates_registry.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/factory_girl-4.8.0/lib/factory_girl/decorator/disallows_duplicates_registry.rb
factory_girl-4.8.0 lib/factory_girl/decorator/disallows_duplicates_registry.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/factory_girl-4.7.0/lib/factory_girl/decorator/disallows_duplicates_registry.rb
factory_girl-4.7.0 lib/factory_girl/decorator/disallows_duplicates_registry.rb
opal-factory_girl-4.5.0.3 factory_girl/lib/factory_girl/decorator/disallows_duplicates_registry.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/factory_girl-4.5.0/lib/factory_girl/decorator/disallows_duplicates_registry.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/factory_girl-4.5.0/lib/factory_girl/decorator/disallows_duplicates_registry.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/factory_girl-4.5.0/lib/factory_girl/decorator/disallows_duplicates_registry.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/factory_girl-4.5.0/lib/factory_girl/decorator/disallows_duplicates_registry.rb
apl-library-0.0.90 vendor/bundle/ruby/1.9.1/gems/factory_girl-4.4.0/lib/factory_girl/decorator/disallows_duplicates_registry.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/factory_girl-4.4.0/lib/factory_girl/decorator/disallows_duplicates_registry.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/2.1.0/gems/factory_girl-4.4.0/lib/factory_girl/decorator/disallows_duplicates_registry.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.9.1/gems/factory_girl-4.4.0/lib/factory_girl/decorator/disallows_duplicates_registry.rb
factory_girl-4.5.0 lib/factory_girl/decorator/disallows_duplicates_registry.rb
factory_girl-4.4.0 lib/factory_girl/decorator/disallows_duplicates_registry.rb
factory_girl-4.3.0 lib/factory_girl/decorator/disallows_duplicates_registry.rb