diff options
author | sawanoboly <sawanoboriyu@higanworks.com> | 2015-04-06 13:51:45 +0900 |
---|---|---|
committer | danielsdeleo <dan@getchef.com> | 2015-05-26 12:49:18 -0700 |
commit | 0967a2bb52bafdb511cd1a8a0b087f00079bc5f0 (patch) | |
tree | f1e76b8b8535964a66cd9ecc8403173c07101ca5 | |
parent | 18a31ba41ca6ef80ef162efa49930131f0bb0501 (diff) | |
download | chef-0967a2bb52bafdb511cd1a8a0b087f00079bc5f0.tar.gz |
write spec for d15df60bf493ece1d92bdadb6753d76beedaad73
-rw-r--r-- | spec/unit/knife/core/ui_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/unit/knife/core/ui_spec.rb b/spec/unit/knife/core/ui_spec.rb index 4f48d4ff0d..1fe46eb85b 100644 --- a/spec/unit/knife/core/ui_spec.rb +++ b/spec/unit/knife/core/ui_spec.rb @@ -368,6 +368,13 @@ EOM @ui.config[:attribute] = "keys.keys" expect(@ui.format_for_display(input)).to eq({ "sample-data-bag-item" => { "keys.keys" => "values" } }) end + + it "should return the name attribute" do + allow_any_instance_of(Chef::Node).to receive(:name).and_return("chef.localdomain") + input = Chef::Node.new + @ui.config[:attribute] = "name" + expect(@ui.format_for_display(input)).to eq( {"chef.localdomain"=>{"name"=>"chef.localdomain"} }) + end end describe "with --run-list passed" do |