Class: Schienenzeppelin::AddOns::FactoryBot

Inherits:
Schienenzeppelin::AddOn show all
Defined in:
lib/schienenzeppelin/addons/factory_bot.rb

Instance Attribute Summary

Attributes inherited from Schienenzeppelin::AddOn

#context, #dependencies

Instance Method Summary collapse

Methods inherited from Schienenzeppelin::AddOn

apply, default_source_root, dependencies, get, identifier, #initialize

Constructor Details

This class inherits a constructor from Schienenzeppelin::AddOn

Instance Method Details

#applyObject



8
9
10
11
12
13
14
# File 'lib/schienenzeppelin/addons/factory_bot.rb', line 8

def apply
  # TODO: Make this work for minitest
  return unless uses?(:factory_bot)

  empty_directory 'spec/factories'
  template('spec/support/factory_bot.rb')
end