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
7 8 9 |
# File 'lib/bddgen/app.rb', line 7 def self.source_root File.('../../templates', File.dirname(__FILE__)) end |
Instance Method Details
#cucumber ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/bddgen/app.rb', line 12 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
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/bddgen/app.rb', line 50 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/version.erb", "lib/version.rb" cucumber if .cucumber? rspec if .rspec? yard if .yard? end |