summaryrefslogtreecommitdiff
path: root/spec/unit/runner_spec.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2014-01-29 14:17:47 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2014-01-29 14:17:47 -0800
commitb19b7d000887209f9d8dc1dc6aa468a0497a7391 (patch)
tree68d1eb6c136df20c2800f1dddb4e2c1ed5d75a42 /spec/unit/runner_spec.rb
parentb5c9c6afdfd83fe3f1bf4c991daffeff94b49750 (diff)
downloadchef-b19b7d000887209f9d8dc1dc6aa468a0497a7391.tar.gz
s/stub!/stub/g
fix deprecation warnings
Diffstat (limited to 'spec/unit/runner_spec.rb')
-rw-r--r--spec/unit/runner_spec.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/unit/runner_spec.rb b/spec/unit/runner_spec.rb
index 28082078c2..1e449bd1c0 100644
--- a/spec/unit/runner_spec.rb
+++ b/spec/unit/runner_spec.rb
@@ -125,24 +125,24 @@ describe Chef::Runner do
it "should raise exceptions as thrown by a provider" do
provider = Chef::Provider::SnakeOil.new(@run_context.resource_collection[0], @run_context)
- Chef::Provider::SnakeOil.stub!(:new).once.and_return(provider)
- provider.stub!(:action_sell).once.and_raise(ArgumentError)
+ Chef::Provider::SnakeOil.stub(:new).once.and_return(provider)
+ provider.stub(:action_sell).once.and_raise(ArgumentError)
lambda { @runner.converge }.should raise_error(ArgumentError)
end
it "should not raise exceptions thrown by providers if the resource has ignore_failure set to true" do
- @run_context.resource_collection[0].stub!(:ignore_failure).and_return(true)
+ @run_context.resource_collection[0].stub(:ignore_failure).and_return(true)
provider = Chef::Provider::SnakeOil.new(@run_context.resource_collection[0], @run_context)
- Chef::Provider::SnakeOil.stub!(:new).once.and_return(provider)
- provider.stub!(:action_sell).once.and_raise(ArgumentError)
+ Chef::Provider::SnakeOil.stub(:new).once.and_return(provider)
+ provider.stub(:action_sell).once.and_raise(ArgumentError)
lambda { @runner.converge }.should_not raise_error(ArgumentError)
end
it "should retry with the specified delay if retries are specified" do
@first_resource.retries 3
provider = Chef::Provider::SnakeOil.new(@run_context.resource_collection[0], @run_context)
- Chef::Provider::SnakeOil.stub!(:new).once.and_return(provider)
- provider.stub!(:action_sell).and_raise(ArgumentError)
+ Chef::Provider::SnakeOil.stub(:new).once.and_return(provider)
+ provider.stub(:action_sell).and_raise(ArgumentError)
@first_resource.should_receive(:sleep).with(2).exactly(3).times
lambda { @runner.converge }.should raise_error(ArgumentError)
end