This shows how to generate a factory for an existing model, for example;
rails g factory_bot:model Car name speed:integer
It would be pretty awesome if factory_bot could accept rails g factory_bot:model Car and assume that when no attributes/types are provided that the factory should be generated with every attribute in the model. That would make it even easier to add factory_bot to existing applications.
This shows how to generate a factory for an existing model, for example;
It would be pretty awesome if factory_bot could accept
rails g factory_bot:model Carand assume that when no attributes/types are provided that the factory should be generated with every attribute in the model. That would make it even easier to add factory_bot to existing applications.