Sha256: dfd0d96e5b095b124b51a7541f1479be1cb7fdbe93e11d2c5687fc39b4546bf1

Contents?: true

Size: 647 Bytes

Versions: 14

Compression:

Stored size: 647 Bytes

Contents

# frozen_string_literal: true

require_relative 'generator'

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

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

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

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

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

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ruby_raider-0.5.6 lib/generators/cucumber_generator.rb
ruby_raider-0.5.5 lib/generators/cucumber_generator.rb
ruby_raider-0.5.4 lib/generators/cucumber_generator.rb
ruby_raider-0.5.3 lib/generators/cucumber_generator.rb
ruby_raider-0.5.2 lib/generators/cucumber_generator.rb
ruby_raider-0.5.1 lib/generators/cucumber_generator.rb
ruby_raider-0.5.0 lib/generators/cucumber_generator.rb
ruby_raider-0.4.9 lib/generators/cucumber_generator.rb
ruby_raider-0.4.8 lib/generators/cucumber_generator.rb
ruby_raider-0.4.7 lib/generators/cucumber_generator.rb
ruby_raider-0.4.6 lib/generators/cucumber_generator.rb
ruby_raider-0.4.5 lib/generators/cucumber_generator.rb
ruby_raider-0.4.4 lib/generators/cucumber_generator.rb
ruby_raider-0.4.3 lib/generators/cucumber_generator.rb