Sha256: 5f3f3f7f8a6c4168aba0c8b62f7b6bae4aeab2b1b1b0e8148641c3fb1dd957e4

Contents?: true

Size: 820 Bytes

Versions: 33

Compression:

Stored size: 820 Bytes

Contents

# frozen_string_literal: true

require_relative '../generator'

class CucumberGenerator < Generator
  def generate_feature
    template('feature.tt', "#{name}/features/#{template_name}.feature")
  end

  def generate_steps
    template('steps.tt', "#{name}/features/step_definitions/#{template_name}_steps.rb")
  end

  def generate_user_factory
    template('user_factory.tt', "#{name}/models/user_factory.rb")
  end

  def generate_env_file
    template('env.tt', "#{name}/features/support/env.rb")
  end

  def generate_world
    template('world.tt', "#{name}/features/support/world.rb")
  end

  def generate_cucumber_file
    template('cucumber.tt', "#{name}/cucumber.yml")
  end

  def template_name
    @template_name ||= (@_initializer.first & %w[android ios cross_platform]).empty? ? 'login' : 'home'
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
ruby_raider-1.0.8 lib/generators/cucumber/cucumber_generator.rb
ruby_raider-1.0.7 lib/generators/cucumber/cucumber_generator.rb
ruby_raider-1.0.6 lib/generators/cucumber/cucumber_generator.rb
ruby_raider-1.0.5 lib/generators/cucumber/cucumber_generator.rb
ruby_raider-1.0.4 lib/generators/cucumber/cucumber_generator.rb
ruby_raider-1.0.3 lib/generators/cucumber/cucumber_generator.rb
ruby_raider-1.0.2 lib/generators/cucumber/cucumber_generator.rb
ruby_raider-1.0.1 lib/generators/cucumber/cucumber_generator.rb
ruby_raider-1.0.0 lib/generators/cucumber/cucumber_generator.rb
ruby_raider-0.9.9 lib/generators/cucumber/cucumber_generator.rb
ruby_raider-0.9.8 lib/generators/cucumber/cucumber_generator.rb
ruby_raider-0.9.7 lib/generators/cucumber/cucumber_generator.rb
ruby_raider-0.9.6 lib/generators/cucumber/cucumber_generator.rb
ruby_raider-0.9.5 lib/generators/cucumber/cucumber_generator.rb
ruby_raider-0.9.4 lib/generators/cucumber/cucumber_generator.rb
ruby_raider-0.9.3 lib/generators/cucumber/cucumber_generator.rb
ruby_raider-0.9.2 lib/generators/cucumber/cucumber_generator.rb
ruby_raider-0.9.1 lib/generators/cucumber/cucumber_generator.rb
ruby_raider-0.9.0 lib/generators/cucumber/cucumber_generator.rb
ruby_raider-0.8.9 lib/generators/cucumber/cucumber_generator.rb