Sha256: cfe263535344b70fa8575030014a2cf5af3b45d50a7d79396e52c12cfe830731

Contents?: true

Size: 599 Bytes

Versions: 4

Compression:

Stored size: 599 Bytes

Contents

# frozen_string_literal: true

# lib/rails_app_generator/rag_initializer.rb
# add_if(:rspec)
# rag.add_option :add_rspec            , type: :boolean, default: false

module RailsAppGenerator
  # Custom add-ons for RailsAppGenerator
  module AddOns
    # Add Rspec to rails application
    class Rspec < RailsAppGenerator::Addon
      required_gem gem.version('rspec', '3.11.0', 'BDD for Ruby')

      depends_on :test

      def apply
        create_file('.rspec', '--require spec_helper')
        template('spec/rails_helper.rb')
        template('spec/spec_helper.rb')
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rails_app_generator-0.3.6 lib/rails_app_generator/addons/rspec.rb
rails_app_generator-0.3.5 lib/rails_app_generator/addons/rspec.rb
rails_app_generator-0.3.4 lib/rails_app_generator/addons/rspec.rb
rails_app_generator-0.3.3 lib/rails_app_generator/addons/rspec.rb