factory girl to factory bot code example Example 1: factorybot gem install factory_bot Example 2: factorybot gem 'factory_bot'