Module: FactoryGirl::Syntax::Blueprint::ActiveRecord::ClassMethods

Defined in:
lib/factory_girl/syntax/blueprint.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#blueprint(&block) ⇒ Object



28
29
30
31
32
33
# File 'lib/factory_girl/syntax/blueprint.rb', line 28

def blueprint(&block)
  instance = Factory.new(name.underscore, :class => self)
  proxy = FactoryGirl::DefinitionProxy.new(instance)
  proxy.instance_eval(&block)
  FactoryGirl.register_factory(instance)
end