diff options
Diffstat (limited to 'spec/unit/provider/service/macosx_spec.rb')
-rw-r--r-- | spec/unit/provider/service/macosx_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/provider/service/macosx_spec.rb b/spec/unit/provider/service/macosx_spec.rb index 2941230160..6cc0f88725 100644 --- a/spec/unit/provider/service/macosx_spec.rb +++ b/spec/unit/provider/service/macosx_spec.rb @@ -83,7 +83,7 @@ describe Chef::Provider::Service::Macosx do .with(/(#{su_cmd} '#{cmd}'|#{cmd})/, default_env: false) .and_return(double("Status", stdout: launchctl_stdout, exitstatus: 0)) - allow(File).to receive(:exists?).and_return([true], []) + allow(File).to receive(:exist?).and_return([true], []) allow(provider).to receive(:shell_out!) .with(/plutil -convert xml1 -o/, default_env: false) .and_return(double("Status", stdout: plutil_stdout)) @@ -109,7 +109,7 @@ describe Chef::Provider::Service::Macosx do before do allow(Dir).to receive(:glob).and_return([]) - allow(File).to receive(:exists?).and_return([true], []) + allow(File).to receive(:exist?).and_return([true], []) allow(provider).to receive(:shell_out!) .with(/plutil -convert xml1 -o/) .and_raise(Mixlib::ShellOut::ShellCommandFailed) @@ -165,7 +165,7 @@ describe Chef::Provider::Service::Macosx do describe "running unsupported actions" do before do allow(Dir).to receive(:glob).and_return([(plist).to_s], []) - allow(File).to receive(:exists?).and_return([true], []) + allow(File).to receive(:exist?).and_return([true], []) end it "should throw an exception when reload action is attempted" do expect { provider.run_action(:reload) }.to raise_error(Chef::Exceptions::UnsupportedAction) |