diff options
Diffstat (limited to 'spec/unit/provider/service/redhat_spec.rb')
-rw-r--r-- | spec/unit/provider/service/redhat_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/unit/provider/service/redhat_spec.rb b/spec/unit/provider/service/redhat_spec.rb index 3ce4301026..0de93fe430 100644 --- a/spec/unit/provider/service/redhat_spec.rb +++ b/spec/unit/provider/service/redhat_spec.rb @@ -21,9 +21,9 @@ require 'ostruct' shared_examples_for "define_resource_requirements_common" do it "should raise an error if /sbin/chkconfig does not exist" do - File.stub!(:exists?).with("/sbin/chkconfig").and_return(false) - @provider.stub!(:shell_out).with("/sbin/service chef status").and_raise(Errno::ENOENT) - @provider.stub!(:shell_out!).with("/sbin/chkconfig --list chef", :returns => [0,1]).and_raise(Errno::ENOENT) + File.stub(:exists?).with("/sbin/chkconfig").and_return(false) + @provider.stub(:shell_out).with("/sbin/service chef status").and_raise(Errno::ENOENT) + @provider.stub(:shell_out!).with("/sbin/chkconfig --list chef", :returns => [0,1]).and_raise(Errno::ENOENT) @provider.load_current_resource @provider.define_resource_requirements lambda { @provider.process_resource_requirements }.should raise_error(Chef::Exceptions::Service) @@ -54,8 +54,8 @@ describe "Chef::Provider::Service::Redhat" do @provider = Chef::Provider::Service::Redhat.new(@new_resource, @run_context) @provider.action = :start - Chef::Resource::Service.stub!(:new).and_return(@current_resource) - File.stub!(:exists?).with("/sbin/chkconfig").and_return(true) + Chef::Resource::Service.stub(:new).and_return(@current_resource) + File.stub(:exists?).with("/sbin/chkconfig").and_return(true) end describe "while not in why run mode" do |