summaryrefslogtreecommitdiff
path: root/spec/unit/shell
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2014-01-29 14:18:28 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2014-01-29 14:18:28 -0800
commitdb9f8dce667916cd6575d2894c8ca25006138836 (patch)
treee53990767d7a7b7e8c369cf546e298e1635788d9 /spec/unit/shell
parentb19b7d000887209f9d8dc1dc6aa468a0497a7391 (diff)
downloadchef-db9f8dce667916cd6575d2894c8ca25006138836.tar.gz
s/mock\(/double(/g
Diffstat (limited to 'spec/unit/shell')
-rw-r--r--spec/unit/shell/model_wrapper_spec.rb2
-rw-r--r--spec/unit/shell/shell_ext_spec.rb8
-rw-r--r--spec/unit/shell/shell_session_spec.rb4
3 files changed, 7 insertions, 7 deletions
diff --git a/spec/unit/shell/model_wrapper_spec.rb b/spec/unit/shell/model_wrapper_spec.rb
index 17e4227a75..eae3b2b581 100644
--- a/spec/unit/shell/model_wrapper_spec.rb
+++ b/spec/unit/shell/model_wrapper_spec.rb
@@ -71,7 +71,7 @@ describe Shell::ModelWrapper do
@wrapper = Shell::ModelWrapper.new(Chef::Node)
# Creating a Chef::Search::Query object tries to read the private key...
- @searcher = mock("Chef::Search::Query #{__FILE__}:#{__LINE__}")
+ @searcher = double("Chef::Search::Query #{__FILE__}:#{__LINE__}")
Chef::Search::Query.stub(:new).and_return(@searcher)
end
diff --git a/spec/unit/shell/shell_ext_spec.rb b/spec/unit/shell/shell_ext_spec.rb
index 4710fd9c4b..c24acbca3e 100644
--- a/spec/unit/shell/shell_ext_spec.rb
+++ b/spec/unit/shell/shell_ext_spec.rb
@@ -28,14 +28,14 @@ describe Shell::Extensions do
@root_context = Object.new
@root_context.instance_eval(&ObjectTestHarness)
Shell::Extensions.extend_context_object(@root_context)
- @root_context.conf = mock("irbconf")
+ @root_context.conf = double("irbconf")
end
it "finds a subsession in irb for an object" do
target_context_obj = Chef::Node.new
- irb_context = mock("context", :main => target_context_obj)
- irb_session = mock("irb session", :context => irb_context)
+ irb_context = double("context", :main => target_context_obj)
+ irb_session = double("irb session", :context => irb_context)
@job_manager.jobs = [[:thread, irb_session]]
@root_context.stub(:jobs).and_return(@job_manager)
@root_context.ensure_session_select_defined
@@ -92,7 +92,7 @@ describe Shell::Extensions do
end
it "prints node attributes" do
- node = mock("node", :attribute => {:foo => :bar})
+ node = double("node", :attribute => {:foo => :bar})
@shell_client.node = node
@root_context.should_receive(:pp).with({:foo => :bar})
@root_context.ohai
diff --git a/spec/unit/shell/shell_session_spec.rb b/spec/unit/shell/shell_session_spec.rb
index 2ad24d05ce..d305ed0ec6 100644
--- a/spec/unit/shell/shell_session_spec.rb
+++ b/spec/unit/shell/shell_session_spec.rb
@@ -89,7 +89,7 @@ describe Shell::StandAloneSession do
it "runs chef with the standalone recipe" do
@session.stub(:node_built?).and_return(true)
Chef::Log.stub(:level)
- chef_runner = mock("Chef::Runner.new", :converge => :converged)
+ chef_runner = double("Chef::Runner.new", :converge => :converged)
# pre-heat resource collection cache
@session.resource_collection
@@ -145,7 +145,7 @@ describe Shell::SoloSession do
it "runs chef with a resource collection from the compiled cookbooks" do
@session.stub(:node_built?).and_return(true)
Chef::Log.stub(:level)
- chef_runner = mock("Chef::Runner.new", :converge => :converged)
+ chef_runner = double("Chef::Runner.new", :converge => :converged)
Chef::Runner.should_receive(:new).with(an_instance_of(Chef::RunContext)).and_return(chef_runner)
@recipe.run_chef.should == :converged