diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2014-01-29 14:18:28 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2014-01-29 14:18:28 -0800 |
commit | db9f8dce667916cd6575d2894c8ca25006138836 (patch) | |
tree | e53990767d7a7b7e8c369cf546e298e1635788d9 /spec/unit/client_spec.rb | |
parent | b19b7d000887209f9d8dc1dc6aa468a0497a7391 (diff) | |
download | chef-db9f8dce667916cd6575d2894c8ca25006138836.tar.gz |
s/mock\(/double(/g
Diffstat (limited to 'spec/unit/client_spec.rb')
-rw-r--r-- | spec/unit/client_spec.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/unit/client_spec.rb b/spec/unit/client_spec.rb index 724b8ba451..378f0cb7b6 100644 --- a/spec/unit/client_spec.rb +++ b/spec/unit/client_spec.rb @@ -168,10 +168,10 @@ shared_examples_for Chef::Client do describe "run" do it "should identify the node and run ohai, then register the client" do - mock_chef_rest_for_node = mock("Chef::REST (node)") - mock_chef_rest_for_cookbook_sync = mock("Chef::REST (cookbook sync)") - mock_chef_rest_for_node_save = mock("Chef::REST (node save)") - mock_chef_runner = mock("Chef::Runner") + mock_chef_rest_for_node = double("Chef::REST (node)") + mock_chef_rest_for_cookbook_sync = double("Chef::REST (cookbook sync)") + mock_chef_rest_for_node_save = double("Chef::REST (node save)") + mock_chef_runner = double("Chef::Runner") # --Client.register # Make sure Client#register thinks the client key doesn't @@ -253,10 +253,10 @@ shared_examples_for Chef::Client do end it "should remove the run_lock on failure of #load_node" do - @run_lock = mock("Chef::RunLock", :acquire => true) + @run_lock = double("Chef::RunLock", :acquire => true) Chef::RunLock.stub(:new).and_return(@run_lock) - @events = mock("Chef::EventDispatch::Dispatcher").as_null_object + @events = double("Chef::EventDispatch::Dispatcher").as_null_object Chef::EventDispatch::Dispatcher.stub(:new).and_return(@events) # @events is created on Chef::Client.new, so we need to recreate it after mocking @@ -324,7 +324,7 @@ shared_examples_for Chef::Client do # build_node will call Node#expand! with server, which will # eventually hit the server to expand the included role. - mock_chef_rest = mock("Chef::REST") + mock_chef_rest = double("Chef::REST") mock_chef_rest.should_receive(:get_rest).with("roles/role_containing_cookbook1").and_return(role_containing_cookbook1) Chef::REST.should_receive(:new).and_return(mock_chef_rest) @@ -434,7 +434,7 @@ shared_examples_for Chef::Client do original_runlist = @node.run_list.dup - mock_chef_rest = mock("Chef::REST") + mock_chef_rest = double("Chef::REST") mock_chef_rest.should_receive(:get_rest).with("roles/test_role").and_return(override_role) Chef::REST.should_receive(:new).and_return(mock_chef_rest) |