Sha256: f5c158a6a7231e0b073cdf4ef2be28ac5a3eda7f5d3ad602d2855af5c67b05ab
Contents?: true
Size: 979 Bytes
Versions: 17
Compression:
Stored size: 979 Bytes
Contents
require 'factory_girl_rails/generators/rspec_generator' require 'factory_girl_rails/generators/non_rspec_generator' require 'factory_girl_rails/generators/null_generator' module FactoryGirlRails class Generator def initialize(config) @generators = if config.respond_to?(:app_generators) config.app_generators else config.generators end end def run generator.new(@generators).run end def generator if factory_girl_disabled? Generators::NullGenerator else if test_framework == :rspec Generators::RSpecGenerator else Generators::NonRSpecGenerator end end end def test_framework rails_options[:test_framework] end def factory_girl_disabled? rails_options[:factory_girl] == false end def rails_options @generators.options[:rails] end end end
Version data entries
17 entries across 17 versions & 6 rubygems