class FactoryBotRails::Generators::NonRSpecGenerator

Public Class Methods

new(generators) click to toggle source
# File lib/factory_bot_rails/generators/non_rspec_generator.rb, line 4
def initialize(generators)
  @generators = generators
end

Public Instance Methods

run() click to toggle source
# File lib/factory_bot_rails/generators/non_rspec_generator.rb, line 8
def run
  @generators.test_framework test_framework, fixture: false, fixture_replacement: :factory_bot
end

Private Instance Methods

test_framework() click to toggle source
# File lib/factory_bot_rails/generators/non_rspec_generator.rb, line 14
def test_framework
  @generators.options[:rails][:test_framework]
end