diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-09-29 14:35:14 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-10-25 09:29:29 -0700 |
commit | 10904d6cf42a2a0ed69757aca3e80f512bb89379 (patch) | |
tree | 8ca5e167c77e3f2301a27c8926d7df72520fe7a3 /spec | |
parent | c38fd335b667ccc8dcb1a0ae276be44f344c9fea (diff) | |
download | chef-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')
-rw-r--r-- | spec/unit/node/vivid_mash_spec.rb | 5 |
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 |