class FactoryGirl::Configuration
@api private
Attributes
allow_class_lookup[RW]
callback_names[R]
factories[R]
sequences[R]
strategies[R]
traits[R]
Public Class Methods
new()
click to toggle source
# File lib/factory_girl/configuration.rb, line 8 def initialize @factories = Decorator::DisallowsDuplicatesRegistry.new(Registry.new('Factory')) @sequences = Decorator::DisallowsDuplicatesRegistry.new(Registry.new('Sequence')) @traits = Decorator::DisallowsDuplicatesRegistry.new(Registry.new('Trait')) @strategies = Registry.new('Strategy') @callback_names = Set.new @definition = Definition.new @allow_class_lookup = true to_create { |instance| instance.save! } initialize_with { new } end
Public Instance Methods
duplicate_attribute_assignment_from_initialize_with()
click to toggle source
# File lib/factory_girl/configuration.rb, line 29 def duplicate_attribute_assignment_from_initialize_with false end
duplicate_attribute_assignment_from_initialize_with=(value)
click to toggle source
# File lib/factory_girl/configuration.rb, line 33 def duplicate_attribute_assignment_from_initialize_with=(value) ActiveSupport::Deprecation.warn 'Assignment of duplicate_attribute_assignment_from_initialize_with is unnecessary as this is now default behavior in FactoryGirl 4.0; this line can be removed', caller end
initialize_with(&block)
click to toggle source
# File lib/factory_girl/configuration.rb, line 25 def initialize_with(&block) @definition.define_constructor(&block) end