diff options
Diffstat (limited to 'spec/unit/provider/service/arch_service_spec.rb')
-rw-r--r-- | spec/unit/provider/service/arch_service_spec.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/unit/provider/service/arch_service_spec.rb b/spec/unit/provider/service/arch_service_spec.rb index cc48459c90..026db3dc75 100644 --- a/spec/unit/provider/service/arch_service_spec.rb +++ b/spec/unit/provider/service/arch_service_spec.rb @@ -37,7 +37,8 @@ describe Chef::Provider::Service::Arch, "load_current_resource" do @provider = Chef::Provider::Service::Arch.new(@new_resource, @run_context) - allow(::File).to receive(:exists?).with("/etc/rc.conf").and_return(true) + allow(::File).to receive(:exist?).with("/etc/rc.d/chef").and_return(false) + allow(::File).to receive(:exist?).with("/etc/rc.conf").and_return(true) allow(::File).to receive(:read).with("/etc/rc.conf").and_return("DAEMONS=(network apache sshd)") end @@ -106,7 +107,7 @@ describe Chef::Provider::Service::Arch, "load_current_resource" do end it "should fail if file /etc/rc.conf does not exist" do - allow(::File).to receive(:exists?).with("/etc/rc.conf").and_return(false) + allow(::File).to receive(:exist?).with("/etc/rc.conf").and_return(false) expect { @provider.load_current_resource }.to raise_error(Chef::Exceptions::Service) end |