Sha256: e09ff1d5cd3870288beead2cf2565a7faf22e0cf2cea6db226adf54bc8d87ee6

Contents?: true

Size: 655 Bytes

Versions: 1

Compression:

Stored size: 655 Bytes

Contents

require_relative "base"

module Flame
  class TestingGenerator < Generators::Base
    def install_rspec
      generate("rspec:install")
    end

    def import_spec_support
      inject_into_file(
        "spec/rails_helper.rb",
        "Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }\n",
        before: "RSpec.configure do |config|\n"
      )
    end

    def support_template
      template("spec/support/shoulda_matchers.rb")
      template("spec/support/factory_bot.rb")
      template("spec/support/database_cleaner.rb")
      #TODO: Move this
      template(".rubocop.yml")
      template(".solargraph.yml" )
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
flamerb-0.2.3 lib/flame/generators/testing_generator.rb