Feature: configure command As CLI user of Berkshelf I want a command to generate a Berkshelf configuration file based on my input So I can quickly get up and running with the least amount of resistance Scenario: generating a new config file Given I do not have a Berkshelf config file When I run the "configure" command interactively And I type "https://api.opscode.com/organizations/vialstudios" And I type "node_name" And I type "client_key" And I type "reset" And I type "/Users/reset/.chef/reset.pem" And I type "Berkshelf-minimal" And I type "https://dl.dropbox.com/Berkshelf.box" Then the output should contain: """ Config written to: """ And the exit status should be 0 And a Berkshelf config file should exist and contain: | chef.chef_server_url | https://api.opscode.com/organizations/vialstudios | | chef.validation_client_name | reset | | chef.node_name | node_name | | chef.client_key | client_key | | chef.validation_key_path | /Users/reset/.chef/reset.pem | | vagrant.vm.box | Berkshelf-minimal | | vagrant.vm.box_url | https://dl.dropbox.com/Berkshelf.box | Scenario: generating a config with default values Given I do not have a Berkshelf config file When I run the "configure" command interactively And I type "" And I type "" And I type "" And I type "" And I type "" And I type "" And I type "" Then the output should contain: """ Config written to: """ And the exit status should be 0 And a Berkshelf config file should exist and contain: | chef.chef_server_url | http://localhost:4000 | | chef.validation_client_name | chef-validator | | chef.client_key | /etc/chef/client.pem | | chef.validation_key_path | /etc/chef/validation.pem | | vagrant.vm.box | Berkshelf-CentOS-6.3-x86_64-minimal | | vagrant.vm.box_url | https://dl.dropbox.com/u/31081437/Berkshelf-CentOS-6.3-x86_64-minimal.box | Scenario: attempting to generate a new config when one already exists Given I have a default Berkshelf config file When I run the "configure" command interactively Then the output should contain: """ A configuration file already exists. Re-run with the --force flag if you wish to overwrite it. """ And the CLI should exit with the status code for error "ConfigExists"