diff options
Diffstat (limited to 'spec/unit/mixin/powershell_type_coercions_spec.rb')
-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 c1184cce7c..f7b4fcd723 100644 --- a/spec/unit/mixin/powershell_type_coercions_spec.rb +++ b/spec/unit/mixin/powershell_type_coercions_spec.rb @@ -69,6 +69,11 @@ describe Chef::Mixin::PowershellTypeCoercions do expect(test_class.translate_type(test_mash)).to eq("@{a=1;b=1.2;c=$false;d=$true}") end + it "translates a Chef::Node::ImmutableArray like an array" do + test_array = Chef::Node::ImmutableArray.new([true, false]) + expect(test_class.translate_type(test_array)).to eq("@($true,$false)") + end + it "falls back :to_psobject if we have not defined at explicit rule" do ps_obj = double("PSObject") expect(ps_obj).to receive(:to_psobject).and_return("$true") |