diff options
author | danielsdeleo <dan@chef.io> | 2015-09-11 17:18:22 -0700 |
---|---|---|
committer | danielsdeleo <dan@chef.io> | 2015-09-17 14:29:49 -0700 |
commit | 6f65a2ea7771a319e4315d68dd5234aeedc7dfd9 (patch) | |
tree | ca0da5951f2cd832d97e7b26493741c3b6d7e55f /spec/unit/client_spec.rb | |
parent | 69c7fa5f63e01c64f8ccc198ddc00c836c24914e (diff) | |
download | chef-6f65a2ea7771a319e4315d68dd5234aeedc7dfd9.tar.gz |
Use the dynamic policy builder everywhere
Diffstat (limited to 'spec/unit/client_spec.rb')
-rw-r--r-- | spec/unit/client_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/unit/client_spec.rb b/spec/unit/client_spec.rb index 8146774764..f736c38859 100644 --- a/spec/unit/client_spec.rb +++ b/spec/unit/client_spec.rb @@ -364,6 +364,8 @@ describe Chef::Client do expect(node[:expanded_run_list]).to be_nil allow(client.policy_builder).to receive(:node).and_return(node) + client.policy_builder.select_implementation(node) + allow(client.policy_builder.implementation).to receive(:node).and_return(node) # chefspec and possibly others use the return value of this method expect(client.build_node).to eq(node) @@ -391,6 +393,8 @@ describe Chef::Client do expect(mock_chef_rest).to receive(:get_rest).with("environments/A").and_return(test_env) expect(Chef::REST).to receive(:new).and_return(mock_chef_rest) allow(client.policy_builder).to receive(:node).and_return(node) + client.policy_builder.select_implementation(node) + allow(client.policy_builder.implementation).to receive(:node).and_return(node) expect(client.build_node).to eq(node) expect(node.chef_environment).to eq("A") |