module Spinach::Generators

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

Public Class Methods

run(files) click to toggle source

generates steps for features @files [Array]

filenames to evaluate for step generation
# File lib/spinach/generators.rb, line 9
def self.run(files)
  successful = true
  files.each do |file|
    feature = Parser.open_file(file).parse

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