Class: BDDGen::App
- Inherits:
-
Thor
- Object
- Thor
- BDDGen::App
- Includes:
- Thor::Actions
- Defined in:
- lib/bddgen/app.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
10 11 12 |
# File 'lib/bddgen/app.rb', line 10 def self.source_root File.('../../templates', File.dirname(__FILE__)) end |
Instance Method Details
#cucumber ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/bddgen/app.rb', line 20 def cucumber init_gemfile append_gem 'cucumber' init_rakefile append_task BDDGen::Tasks.cucumber add_file "features/step_definitions/#{project_name}_steps.rb" copy_file "features/support/env.rb" template "features/support/helpers.erb", "features/support/helpers.rb" end |
#project(name) ⇒ Object
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/bddgen/app.rb', line 58 def project(name) empty_directory name self.destination_root = name empty_directory "lib/#{name}" init_gitignore init_gemfile init_rakefile add_file "CHANGELOG" add_file "README.markdown" template "lib/project.erb", "lib/#{name}.rb" template "lib/project/version.erb", "lib/#{name}/version.rb" cucumber if .cucumber? rspec if .rspec? yard if .yard? end |