Module: Lopata::FactoryBot::Methods

Included in:
Scenario
Defined in:
lib/lopata/factory_bot.rb

Overview

To be included in Lopata::Scenario

Instance Method Summary collapse

Instance Method Details

#create(*params) ⇒ Object

Wrapper for FactoryBot#create Calls the FactoryBot#create with given paramters and returns it result. Additionally store the created object for destroying at the end of scenario.



58
59
60
# File 'lib/lopata/factory_bot.rb', line 58

def create(*params)
  cleanup_later ::FactoryBot.create(*params)
end