thoughtbot/factory_girl_rails

View on GitHub
lib/factory_bot_rails/generators/non_rspec_generator.rb

Summary

Maintainability
A
0 mins
Test Coverage
module FactoryBotRails
  module Generators
    class NonRSpecGenerator
      def initialize(generators)
        @generators = generators
      end

      def run
        @generators.test_framework(
          test_framework,
          fixture: false,
          fixture_replacement: :factory_bot
        )
      end

      private

      def test_framework
        @generators.options[:rails][:test_framework]
      end
    end
  end
end