Class: Teststrap::Teststrap
- Inherits:
-
Thor
- Object
- Thor
- Teststrap::Teststrap
- Includes:
- Thor::Actions
- Defined in:
- lib/teststrap.rb
Instance Attribute Summary collapse
-
#cookbook_name ⇒ Object
Returns the value of attribute cookbook_name.
Instance Method Summary collapse
Instance Attribute Details
#cookbook_name ⇒ Object
Returns the value of attribute cookbook_name.
8 9 10 |
# File 'lib/teststrap.rb', line 8 def cookbook_name @cookbook_name end |
Instance Method Details
#generate_tests ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/teststrap.rb', line 13 def generate_tests @cookbook_name = current_directory_name puts "generating testfiles::" copy_file ".gitignore" copy_file ".rubocop.yml" copy_file "Berksfile" copy_file "chefignore" copy_file "Gemfile" copy_file "LICENSE" copy_file "rubocop-disabled.yml" copy_file "Strainerfile" template "spec/default_spec.rb" template "spec/chefspec_helper.rb" template "test/integration/default/serverspec/default_spec.rb" template "test/integration/default/serverspec/spec_helper.rb" template ".kitchen.yml" template "metadata.rb" template "README.md" remove_file "Thorfile" end |