diff options
author | danielsdeleo <dan@opscode.com> | 2013-01-14 16:22:44 -0800 |
---|---|---|
committer | danielsdeleo <dan@opscode.com> | 2013-01-14 17:28:02 -0800 |
commit | 136ce0b0c9dff13e69e442f6c22b5edc71981c1c (patch) | |
tree | 82daf40b73658d1e5d627614ba4926ebe818a03e /spec/unit/application/knife_spec.rb | |
parent | b09dd3272d2557c4722120f89b212bfe72ed7ec3 (diff) | |
download | chef-136ce0b0c9dff13e69e442f6c22b5edc71981c1c.tar.gz |
[CHEF-3497] apply config in the desired order
Takes advantage of new mixlib-cli option to keep default values from the
mixlib-cli DSL separate from user-supplied values. Config settings are
merged:
1. Defaults from mixlib-cli DSL
2. Settings from Chef::Config[:knife]
3. Values from CLI options
Diffstat (limited to 'spec/unit/application/knife_spec.rb')
-rw-r--r-- | spec/unit/application/knife_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/unit/application/knife_spec.rb b/spec/unit/application/knife_spec.rb index 78a65e7045..9560de8d13 100644 --- a/spec/unit/application/knife_spec.rb +++ b/spec/unit/application/knife_spec.rb @@ -23,6 +23,11 @@ describe Chef::Application::Knife do before(:all) do class NoopKnifeCommand < Chef::Knife + option :opt_with_default, + :short => "-D VALUE", + :long => "-optwithdefault VALUE", + :default => "default-value" + def run end end |