Class: Cukestart::Generator::Structure
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Cukestart::Generator::Structure
- Includes:
- Thor::Actions
- Defined in:
- lib/cukestart/generator/structure.rb
Class Method Summary collapse
Instance Method Summary collapse
- #copy_cucumber_yml ⇒ Object
- #create_capybara ⇒ Object
- #create_env ⇒ Object
- #create_folders ⇒ Object
- #create_gemfile ⇒ Object
Class Method Details
.source_root ⇒ Object
11 12 13 |
# File 'lib/cukestart/generator/structure.rb', line 11 def self.source_root File.dirname(__FILE__) end |
Instance Method Details
#copy_cucumber_yml ⇒ Object
23 24 25 |
# File 'lib/cukestart/generator/structure.rb', line 23 def copy_cucumber_yml copy_file('files/cucumber.yml', "#{project_name}/cucumber.yml") end |
#create_capybara ⇒ Object
35 36 37 38 |
# File 'lib/cukestart/generator/structure.rb', line 35 def template('templates/capybara.tt', "#{project_name}/features/support/capybara.rb") if front end |
#create_env ⇒ Object
31 32 33 |
# File 'lib/cukestart/generator/structure.rb', line 31 def create_env template('templates/env.tt', "#{project_name}/features/support/env.rb") end |
#create_folders ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/cukestart/generator/structure.rb', line 15 def create_folders empty_directory(project_name) empty_directory("#{project_name}/features") empty_directory("#{project_name}/features/support") empty_directory("#{project_name}/features/step_definitions") empty_directory("#{project_name}/features/pages") if page_object end |
#create_gemfile ⇒ Object
27 28 29 |
# File 'lib/cukestart/generator/structure.rb', line 27 def create_gemfile template('templates/gemfile.tt', "#{project_name}/Gemfile") end |