summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2018-02-22 15:15:39 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2018-02-22 15:15:39 -0800
commit0eaff267cf603e8494c0a9e631d84f89f3ac179a (patch)
treedae1e32cb6f819d738385565a5459694878ebb28
parent1accff62210095264f331f088a1f6c89e502f6d0 (diff)
downloadchef-0eaff267cf603e8494c0a9e631d84f89f3ac179a.tar.gz
Revert "fixup some unit tests"
This reverts commit b2497ab3d3b8bf17d61fceb67a250c3811be6bdf.
-rw-r--r--spec/unit/mixin/powershell_type_coercions_spec.rb13
1 files changed, 6 insertions, 7 deletions
diff --git a/spec/unit/mixin/powershell_type_coercions_spec.rb b/spec/unit/mixin/powershell_type_coercions_spec.rb
index 159a0a8d1d..6f52abccfb 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-2017, Chef Software Inc.
+# Copyright:: Copyright 2015-2016, Chef Software, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -64,15 +64,14 @@ describe Chef::Mixin::PowershellTypeCoercions do
end
it "translates a Chef::Node::ImmutableMash like a hash" do
- 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}")
+ 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}")
end
it "translates a Chef::Node::ImmutableArray like an array" do
- node = Chef::Node.new
- node.default[:test] = [ true, false ]
- expect(test_class.translate_type(node[:test])).to eq("@($true,$false)")
+ 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