diff options
author | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-03-02 23:07:06 -0800 |
---|---|---|
committer | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-03-20 14:38:03 -0700 |
commit | c7dcd7ffaee7e096ea56176fa88993f12debaecc (patch) | |
tree | 522cdfd83a4e7d622ed0c215aeeb7a960b1cff1c /spec/unit/mixin | |
parent | 1c6feca1fd7487ba02effcdff6a30e26ddc4a490 (diff) | |
download | chef-c7dcd7ffaee7e096ea56176fa88993f12debaecc.tar.gz |
Add type coercion for hash
Diffstat (limited to 'spec/unit/mixin')
-rw-r--r-- | spec/unit/mixin/powershell_type_coercions_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/unit/mixin/powershell_type_coercions_spec.rb b/spec/unit/mixin/powershell_type_coercions_spec.rb index beb605628d..4cca7e2f1f 100644 --- a/spec/unit/mixin/powershell_type_coercions_spec.rb +++ b/spec/unit/mixin/powershell_type_coercions_spec.rb @@ -42,5 +42,10 @@ describe Chef::Mixin::PowershellTypeCoercions do it 'should return $true when an instance of TrueClass is provided' do expect(test_class.translate_type(true)).to eq('$true') end + + it 'should translate all members of a hash and wrap them in @{} separated by ;' do + expect(test_class.translate_type({"a" => 1, "b" => 1.2, "c" => false, "d" => true + })).to eq("@{a=1;b=1.2;c=$false;d=$true}") + end end end |