Module: FactoryTrace::MonkeyPatches::DefinitionProxy

Defined in:
lib/factory_trace/monkey_patches/definition_proxy.rb

Instance Method Summary collapse

Instance Method Details

#factory(name, options = {}, &block) ⇒ Object



6
7
8
# File 'lib/factory_trace/monkey_patches/definition_proxy.rb', line 6

def factory(name, options = {}, &block)
  @child_factories << [name, Helpers::Caller.location, options, block]
end

#trait(name, &block) ⇒ Object



10
11
12
# File 'lib/factory_trace/monkey_patches/definition_proxy.rb', line 10

def trait(name, &block)
  @definition.define_trait(FactoryBot::Trait.new(name, Helpers::Caller.location, &block))
end