1
0
Fork 0
mirror of https://github.com/thoughtbot/factory_bot.git synced 2022-11-09 11:43:51 -05:00
thoughtbot--factory_bot/spec/factory_bot/strategy/create_spec.rb

17 lines
448 B
Ruby

describe FactoryBot::Strategy::Create do
it_should_behave_like "strategy with association support", :create
it_should_behave_like "strategy with callbacks", :after_build, :before_create, :after_create
it "runs a custom create block" do
evaluation = double(
"evaluation",
object: nil,
notify: nil,
create: nil,
)
subject.result(evaluation)
expect(evaluation).to have_received(:create).once
end
end