Module: Spinach::Generators

Defined in:
lib/spinach/generators.rb,
lib/spinach/generators/feature_generator.rb

Overview

Spinach generators are a set of utils that auto-generates example features given some parsed feature data.

Defined Under Namespace

Classes: FeatureGenerator, FeatureGeneratorException, StepGenerator

Class Method Summary (collapse)

Class Method Details

+ (Object) run(files)

generates steps for features



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/spinach/generators.rb', line 9

def self.run(files)
  files.each do |file|
    feature = Parser.open_file(file).parse

    begin
      FeatureGenerator.new(feature).store
    rescue FeatureGeneratorException => e
      $stderr.puts e
    end
  end
end