class FactoryBot::Strategy::Create

Public Instance Methods

association(runner) click to toggle source
# File lib/factory_bot/strategy/create.rb, line 4
def association(runner)
  runner.run
end
result(evaluation) click to toggle source
# File lib/factory_bot/strategy/create.rb, line 8
def result(evaluation)
  evaluation.object.tap do |instance|
    evaluation.notify(:after_build, instance)
    evaluation.notify(:before_create, instance)
    evaluation.create(instance)
    evaluation.notify(:after_create, instance)
  end
end
to_sym() click to toggle source
# File lib/factory_bot/strategy/create.rb, line 17
def to_sym
  :create
end