Class: Cucumber::ProjectInitializer
- Defined in:
- lib/cucumber/project_initializer.rb
Overview
Generates generic file structure for a cucumber project
Instance Method Summary collapse
Instance Method Details
#run ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/cucumber/project_initializer.rb', line 5 def run puts "file expand path = #{File.(__FILE__)}" @version = File.read(File.("../../../lib/mobiusloop/version", __FILE__)) # normal cucumber init, replacing /features for /goals create_directory('goals') create_directory('goals/step_definitions') create_directory('goals/support') create_file('goals/support/env.rb') # extra mobiusloop initiialization copy_step_defs('mobius_steps.rb', 'goals/step_definitions') copy_step_defs('hooks.rb', 'goals/support') copy_step_defs('config/config.yml', 'goals/support') copy_step_defs('scales/page_response_scale.rb', 'goals/step_definitions') # example scale to measure response time copy_gherkin_languages('gherkin-languages.json') # copy modified gherkin-languages.json file to gherkin gem(s) copy_example_file('total_articles_scale.rb', 'goals/step_definitions') copy_example_file('total_readers_scale.rb', 'goals/step_definitions') copy_example_file('increase_readers.goal', 'goals') end |