-
Notifications
You must be signed in to change notification settings - Fork 170
Make chef generate app
set cookbook name
#86
Conversation
\cc @opscode/client-eng |
Looks good to me overall. Would be nice to have a regression test that makes sure we have the right strings inside the generated files (kitchen.yml and such). |
About the strategy of running the templates with bindings generated in the tests, I think it's okay, but we need to be aware that we're involving the system under test in the test itself because the template is part of the system we're testing. To account for this we probably ought to also check for specific strings in the template output to make sure important data is included. |
@danielsdeleo Decided to go with the simpler approach of just checking lines directly... |
Cool, this looks good modulo travis issue. |
@@ -19,6 +19,7 @@ | |||
require 'rspec/mocks' | |||
require 'pry-debugger' | |||
require 'test_helpers' | |||
require 'support/generated_file_support' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we need to remove this since we got rid of that file when we switched back to just matching strings in the generated files.
Make `chef generate app` set cookbook name
Currently
chef generate app app_name
doesn't setcookbook_name = app_name
. This setscookbook_name
andcookbook_root
to app defaults, if not otherwise set.