Sha256: ae32da297d82a161121243758a21b01e8a7ac2d3cd5f79792ab901fd23de0519

Contents?: true

Size: 696 Bytes

Versions: 21

Compression:

Stored size: 696 Bytes

Contents

class FeatureGenerator < RubiGen::Base
  attr_reader :plural_name, :singular_name, :class_name
  
  def initialize(runtime_args, runtime_options = {})
    super
    usage if args.empty?
    @name          = args.shift
    @plural_name   = @name.pluralize.underscore
    @singular_name = @name.singularize.underscore
    @class_name    = @name.singularize.classify
  end

  def manifest
    record do |m|
      m.directory 'features/steps'
      m.template  'feature.erb', "features/manage_#{plural_name}.feature"
      m.template  'steps.erb', "features/steps/#{singular_name}_steps.rb"
    end
  end

protected

  def banner
    "Usage: #{$0} feature ModelName [feature1] [feature2]"
  end

end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
newgem-1.5.3 cucumber_generators/feature/feature_generator.rb
newgem-1.5.0 cucumber_generators/feature/feature_generator.rb
newgem-1.5.1 cucumber_generators/feature/feature_generator.rb
newgem-1.5.2 cucumber_generators/feature/feature_generator.rb
newgem-0.29.0 cucumber_generators/feature/feature_generator.rb
newgem-1.0.0 cucumber_generators/feature/feature_generator.rb
newgem-1.0.3 cucumber_generators/feature/feature_generator.rb
newgem-1.0.4 cucumber_generators/feature/feature_generator.rb
newgem-1.0.5 cucumber_generators/feature/feature_generator.rb
newgem-1.0.2 cucumber_generators/feature/feature_generator.rb
newgem-1.0.1 cucumber_generators/feature/feature_generator.rb
newgem-1.0.6 cucumber_generators/feature/feature_generator.rb
newgem-1.0.7 cucumber_generators/feature/feature_generator.rb
newgem-1.1.0 cucumber_generators/feature/feature_generator.rb
newgem-1.2.0 cucumber_generators/feature/feature_generator.rb
newgem-1.2.1 cucumber_generators/feature/feature_generator.rb
newgem-1.2.2 cucumber_generators/feature/feature_generator.rb
newgem-1.2.3 cucumber_generators/feature/feature_generator.rb
newgem-1.3.0 cucumber_generators/feature/feature_generator.rb
newgem-1.4.0 cucumber_generators/feature/feature_generator.rb