summaryrefslogtreecommitdiff
path: root/spec/unit/mixin
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2015-03-02 23:07:06 -0800
committerJay Mundrawala <jdmundrawala@gmail.com>2015-03-20 14:38:03 -0700
commitc7dcd7ffaee7e096ea56176fa88993f12debaecc (patch)
tree522cdfd83a4e7d622ed0c215aeeb7a960b1cff1c /spec/unit/mixin
parent1c6feca1fd7487ba02effcdff6a30e26ddc4a490 (diff)
downloadchef-c7dcd7ffaee7e096ea56176fa88993f12debaecc.tar.gz
Add type coercion for hash
Diffstat (limited to 'spec/unit/mixin')
-rw-r--r--spec/unit/mixin/powershell_type_coercions_spec.rb5
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