Class: FactoryBot::Generators::ModelGenerator

Inherits:
Base
  • Object
show all
Defined in:
lib/generators/factory_bot/model/model_generator.rb

Instance Method Summary collapse

Methods inherited from Base

#explicit_class_option, #factory_name, source_root

Instance Method Details

#create_fixture_fileObject



28
29
30
31
32
33
34
# File 'lib/generators/factory_bot/model/model_generator.rb', line 28

def create_fixture_file
  if File.exist?(factories_file)
    insert_factory_into_existing_file
  else
    create_factory_file
  end
end