Sha256: 8377d876e7aeb7209025803fe507504d446a2593590780af119060b94f4b5740

Contents?: true

Size: 769 Bytes

Versions: 1

Compression:

Stored size: 769 Bytes

Contents

# frozen_string_literal: true

module Specimen
  module Generator
    class CucumberProjectGenerator < ProjectGeneratorBase
      DEFAULT_DIRECTORIES = %w[features/examples features/step_definitions/examples features/support].freeze
      TEMPLATES_DIR = 'cucumber/templates'
      TEMPLATES = %w[
        features/examples/add_numbers.feature
        features/step_definitions/examples/example_steps.rb
        features/support/env.rb
        config/cucumber.yml
        config/specimen.cukes.yml
      ].freeze

      def execute!
        perform
      end

      no_commands do
        def perform
          create_directories(DEFAULT_DIRECTORIES)
          create_files_by_templates(TEMPLATES_DIR, TEMPLATES)

          true
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
specimen-0.0.4.alpha lib/specimen/generator/cucumber/cucumber_project_generator.rb