summaryrefslogtreecommitdiff
path: root/spec/unit/node
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-09-29 14:35:14 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2016-10-25 09:29:29 -0700
commit10904d6cf42a2a0ed69757aca3e80f512bb89379 (patch)
tree8ca5e167c77e3f2301a27c8926d7df72520fe7a3 /spec/unit/node
parentc38fd335b667ccc8dcb1a0ae276be44f344c9fea (diff)
downloadchef-10904d6cf42a2a0ed69757aca3e80f512bb89379.tar.gz
standardize initializer args for VividMash+ImmutableMash
if anyone is using these directly this might be a breaking change, although it makes it considerably easier to use VividMash and IMO ImmutableMash is an implementation detail of the deep merge cache and Chef::Node object. we definitely have never documented these APIs, so I think the onus is on the consumer to update their code. VividMash.new() should now work. VividMash.new({ foo: :bar }) should also now work. IDK what object people would have been passing in as the root object before. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/unit/node')
-rw-r--r--spec/unit/node/vivid_mash_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/unit/node/vivid_mash_spec.rb b/spec/unit/node/vivid_mash_spec.rb
index 206b15ef6c..eb22929685 100644
--- a/spec/unit/node/vivid_mash_spec.rb
+++ b/spec/unit/node/vivid_mash_spec.rb
@@ -27,8 +27,9 @@ describe Chef::Node::VividMash do
let(:vivid) do
expect(root).to receive(:reset_cache).at_least(:once).with(nil)
- Chef::Node::VividMash.new(root,
- { "one" => { "two" => { "three" => "four" } }, "array" => [ 0, 1, 2 ], "nil" => nil }
+ Chef::Node::VividMash.new(
+ { "one" => { "two" => { "three" => "four" } }, "array" => [ 0, 1, 2 ], "nil" => nil },
+ root
)
end