Class: Spinach::Generators::StepGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/spinach/generators/step_generator.rb

Overview

A step generator generates an example output for a step given the parsed feature data.

Instance Method Summary (collapse)

Constructor Details

- (StepGenerator) initialize(step)



9
10
11
# File 'lib/spinach/generators/step_generator.rb', line 9

def initialize(step)
  @step = step
end

Instance Method Details

- (String) generate



15
16
17
18
19
20
21
# File 'lib/spinach/generators/step_generator.rb', line 15

def generate
  result = StringIO.new
  result.puts "step '#{Spinach::Support.escape_single_commas @step.name}' do"
  result.puts "  pending 'step not implemented'"
  result.puts "end"
  result.string
end