class RailsNewApp::TestFactoryProcessor

Public Instance Methods

configure(config) click to toggle source
# File lib/rails-new-app/processors/test_factory_processor.rb, line 11
def configure(config)
  return if config[:test_runner][:key] == ""

  puts "Processing Test Factory config"
  case config[:test_factory][:key]
  when "factory_boy" then apply_template "factory_bot-#{config[:test_runner][:key]}-config"
  end
end
update_gemfile(config) click to toggle source
# File lib/rails-new-app/processors/test_factory_processor.rb, line 3
def update_gemfile(config)
  return if config[:test_runner][:key] == ""

  case config[:test_factory][:key]
  when "factory_bot" then apply_template "factory_bot-gemfile"
  end
end