create method in Rspec
It looks like create
is called from FactoryBot
.
Usually you need to create object like FactoryBot.create(:user)
but if you configure factory bot
RSpec.configure do |config| config.include FactoryBot::Syntax::Methodsend
(see this) you can omit FactoryBot
and use short variant create(:user)
.
So your code creates factory practice
with creator which is created by another factory physician
.