Sha256: 9b6b71666b6a5430dc4c96b15dc310f5ffb8503eb01054d67584cb37ec3f2843
Contents?: true
Size: 791 Bytes
Versions: 18
Compression:
Stored size: 791 Bytes
Contents
require "factory_bot_rails/generators/rspec_generator" require "factory_bot_rails/generators/non_rspec_generator" require "factory_bot_rails/generators/null_generator" module FactoryBotRails class Generator def initialize(config) @generators = config.app_generators end def run generator.new(@generators).run end def generator return Generators::NullGenerator if factory_bot_disabled? if test_framework == :rspec Generators::RSpecGenerator else Generators::NonRSpecGenerator end end def test_framework rails_options[:test_framework] end def factory_bot_disabled? rails_options[:factory_bot] == false end def rails_options @generators.options[:rails] end end end
Version data entries
18 entries across 17 versions & 2 rubygems