diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2018-02-23 13:53:16 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-23 13:53:16 -0800 |
commit | a7cc775f4001d068c02a5f69c1b039f7ea772773 (patch) | |
tree | de682276d61617aa7f5133e67321b5eaedbdc41c | |
parent | c96a8e88f9784311e6c557d6bc890028db8edbb7 (diff) | |
parent | 19bfa923f3e16a42c80c079ecb8c8815305a3420 (diff) | |
download | chef-a7cc775f4001d068c02a5f69c1b039f7ea772773.tar.gz |
Merge pull request #6912 from chef/lcg/revert-revert-derp
Revert "Revert "fixup some unit tests""
-rw-r--r-- | spec/unit/mixin/powershell_type_coercions_spec.rb | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/spec/unit/mixin/powershell_type_coercions_spec.rb b/spec/unit/mixin/powershell_type_coercions_spec.rb index 6f52abccfb..159a0a8d1d 100644 --- a/spec/unit/mixin/powershell_type_coercions_spec.rb +++ b/spec/unit/mixin/powershell_type_coercions_spec.rb @@ -1,6 +1,6 @@ # # Author:: Jay Mundrawala (<jdm@chef.io>) -# Copyright:: Copyright 2015-2016, Chef Software, Inc. +# Copyright:: Copyright 2015-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -64,14 +64,15 @@ describe Chef::Mixin::PowershellTypeCoercions do end it "translates a Chef::Node::ImmutableMash like a hash" do - test_mash = Chef::Node::ImmutableMash.new({ "a" => 1, "b" => 1.2, - "c" => false, "d" => true }) - expect(test_class.translate_type(test_mash)).to eq("@{a=1;b=1.2;c=$false;d=$true}") + node = Chef::Node.new + node.default[:test] = { "a" => 1, "b" => 1.2, "c" => false, "d" => true } + expect(test_class.translate_type(node[:test])).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)") + node = Chef::Node.new + node.default[:test] = [ true, false ] + expect(test_class.translate_type(node[:test])).to eq("@($true,$false)") end it "falls back :to_psobject if we have not defined at explicit rule" do |