From c7dcd7ffaee7e096ea56176fa88993f12debaecc Mon Sep 17 00:00:00 2001 From: Jay Mundrawala Date: Mon, 2 Mar 2015 23:07:06 -0800 Subject: Add type coercion for hash --- spec/unit/mixin/powershell_type_coercions_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'spec/unit/mixin') 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 -- cgit v1.2.1