Sha256: e4ce9f330ab7ea8f6d23aa0abab289328656801acf01594c39a9d8b858387e46

Contents?: true

Size: 1.06 KB

Versions: 1

Compression:

Stored size: 1.06 KB

Contents

# encoding: utf-8

module PagesCore
  module Generators
    class RspecGenerator < Rails::Generators::Base
      desc "RSpec setup"
      source_root File.expand_path("../templates", __FILE__)

      def setup_development_gems
        gem_group :development do
          gem "spring-commands-rspec"
        end
      end

      def setup_test_gems
        gem_group :test, :development do
          gem "rspec-rails"
          gem "shoulda-matchers", require: false
          gem "json_spec"
          gem "capybara"
          gem "timecop"
          gem "factory_girl_rails"
        end
      end

      def setup_rspec
        create_file File.join(".rspec"), "--colour"
        create_file File.join("spec/controllers/.keep")
        create_file File.join("spec/factories/.keep")
        create_file File.join("spec/models/.keep")
        template "spec_helper.rb", File.join("spec/spec_helper.rb")
        template "factories.rb", File.join("spec/support/factories.rb")
        template "mailer_macros.rb", File.join("spec/support/mailer_macros.rb")
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pages_core-3.5.1 lib/rails/generators/pages_core/rspec/rspec_generator.rb