Class: EmptyCucumber::Create

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/generators/create.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



10
11
12
# File 'lib/generators/create.rb', line 10

def self.source_root
  File.dirname(__FILE__) + "/templates/"
end

Instance Method Details

#copy_cucumber_ymlObject



33
34
35
# File 'lib/generators/create.rb', line 33

def copy_cucumber_yml
  template "cucumber.yml.tt", "#{name}/features/cucumber.yml"
end

#copy_envObject



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_templateObject



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_gemfileObject



41
42
43
# File 'lib/generators/create.rb', line 41

def copy_gemfile
  template "Gemfile.tt", "#{name}/Gemfile"
end

#copy_hooksObject



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_fileObject



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_foldersObject



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