Sha256: 8b86d3e29c32a4efb287169bfff48088f6d72592b38fc3c9511998ba3b501ab2

Contents?: true

Size: 609 Bytes

Versions: 6

Compression:

Stored size: 609 Bytes

Contents

require_relative "base"

module Suspenders
  class FactoriesGenerator < Generators::Base
    def add_factory_bot
      gem "factory_bot_rails", group: %i(development test)
      gem "database_cleaner", group: %i(development test)
      Bundler.with_clean_env { run "bundle install" }
    end

    def set_up_factory_bot_for_rspec
      copy_file "factory_bot_rspec.rb", "spec/support/factory_bot.rb"
    end

    def set_up_factory_lint
      copy_file 'factory_bot.rake', 'lib/tasks/factory_bot.rake'
    end

    def provide_dev_prime_task
      copy_file "dev.rake", "lib/tasks/dev.rake"
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
welaika-suspenders-2.33 lib/suspenders/generators/factories_generator.rb
welaika-suspenders-2.32.2 lib/suspenders/generators/factories_generator.rb
welaika-suspenders-2.32.1 lib/suspenders/generators/factories_generator.rb
welaika-suspenders-2.32.0 lib/suspenders/generators/factories_generator.rb
welaika-suspenders-2.31.0 lib/suspenders/generators/factories_generator.rb
welaika-suspenders-2.30.0 lib/suspenders/generators/factories_generator.rb