Module: StoryGenerator

Defined in:
lib/branston/lib/story_generator.rb

Constant Summary collapse

ALPHABET =
("a".."z").to_a
FEATURE_PATH =
'features/'

Instance Method Summary collapse

Instance Method Details

#feature_filenameObject



17
18
19
20
# File 'lib/branston/lib/story_generator.rb', line 17

def feature_filename
  @story = self if @story.nil?
  clean_title(@story.title) + '.feature'
end

#generate(story) ⇒ Object



11
12
13
14
15
# File 'lib/branston/lib/story_generator.rb', line 11

def generate(story)
  @story = story
  make_steps(story)
  make_feature(story)
end

#step_filenameObject



22
23
24
25
# File 'lib/branston/lib/story_generator.rb', line 22

def step_filename
  @story = self if @story.nil?
  "step_definitions/" + clean_title(@story.title) + '_steps.rb'
end