Class: RailsAppGenerator::AddOns::FactoryBot
- Inherits:
-
RailsAppGenerator::Addon
- Object
- Rails::Generators::Base
- RailsAppGenerator::Addon
- RailsAppGenerator::AddOns::FactoryBot
- Defined in:
- lib/rails_app_generator/addons/factory_bot.rb
Overview
Add FactoryBot to rails application
Instance Attribute Summary
Attributes inherited from RailsAppGenerator::Addon
#context, #dependencies, #gem_entries
Instance Method Summary collapse
-
#apply ⇒ Object
Requires Testing.
Methods inherited from RailsAppGenerator::Addon
addon_name, dependencies, depends_on, gem, gem_entries, #initialize, required_gem, reset_gem_entries
Constructor Details
This class inherits a constructor from RailsAppGenerator::Addon
Instance Method Details
#apply ⇒ Object
Requires Testing
11 12 13 14 15 16 17 |
# File 'lib/rails_app_generator/addons/factory_bot.rb', line 11 def apply # TODO: Make this work for minitest return unless uses?(:factory_bot) empty_directory 'spec/factories' template('spec/support/factory_bot.rb') end |