Class: EmptyCucumber::Create
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- EmptyCucumber::Create
- Includes:
- Thor::Actions
- Defined in:
- lib/generators/create.rb
Class Method Summary collapse
Instance Method Summary collapse
- #copy_cucumber_yml ⇒ Object
- #copy_env ⇒ Object
- #copy_feature_template ⇒ Object
- #copy_gemfile ⇒ Object
- #copy_hooks ⇒ Object
- #copy_steps_def_file ⇒ Object
- #create_folders ⇒ Object
Class Method Details
.source_root ⇒ Object
10 11 12 |
# File 'lib/generators/create.rb', line 10 def self.source_root File.dirname(__FILE__) + "/templates/" end |
Instance Method Details
#copy_cucumber_yml ⇒ Object
33 34 35 |
# File 'lib/generators/create.rb', line 33 def copy_cucumber_yml template "cucumber.yml.tt", "#{name}/features/cucumber.yml" end |
#copy_env ⇒ Object
21 22 23 |
# File 'lib/generators/create.rb', line 21 def copy_env template "env.rb.tt", "#{name}/features/support/env.rb" end |
#copy_feature_template ⇒ Object
29 30 31 |
# File 'lib/generators/create.rb', line 29 def copy_feature_template template "feature_example.feature.tt", "#{name}/features/feature_example.feature" end |
#copy_gemfile ⇒ Object
41 42 43 |
# File 'lib/generators/create.rb', line 41 def copy_gemfile template "Gemfile.tt", "#{name}/Gemfile" end |
#copy_hooks ⇒ Object
25 26 27 |
# File 'lib/generators/create.rb', line 25 def copy_hooks template "hooks.rb.tt", "#{name}/features/support/hooks.rb" end |
#copy_steps_def_file ⇒ Object
37 38 39 |
# File 'lib/generators/create.rb', line 37 def copy_steps_def_file template "steps_example.rb.tt", "#{name}/features/step_definitions/steps_example.rb" end |
#create_folders ⇒ Object
14 15 16 17 18 19 |
# File 'lib/generators/create.rb', line 14 def create_folders empty_directory("#{name}/features") empty_directory("#{name}/features/support") empty_directory("#{name}/features/step_definitions") empty_directory("#{name}/features/support/pages") end |