diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2017-04-01 13:05:35 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2017-04-01 13:05:35 -0700 |
commit | 455c5b0df0f225f3dbabc419b861e0d1157c3d74 (patch) | |
tree | f7171ef468026a057d3e388f268e5552a7c225fe | |
parent | dce4baf0f08a072c9dd76ab7db1e8aa884886285 (diff) | |
download | chef-455c5b0df0f225f3dbabc419b861e0d1157c3d74.tar.gz |
few more stray popen4 failing specs
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r-- | spec/unit/provider/cron_spec.rb | 4 | ||||
-rw-r--r-- | spec/unit/provider/service/debian_service_spec.rb | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/spec/unit/provider/cron_spec.rb b/spec/unit/provider/cron_spec.rb index 19dc19b26c..ef629ebd52 100644 --- a/spec/unit/provider/cron_spec.rb +++ b/spec/unit/provider/cron_spec.rb @@ -918,7 +918,7 @@ MAILTO=foo@example.com it "should raise an exception if another error occurs" do @status = double("Status", exitstatus: 2) allow(@provider).to receive(:shell_out!).and_raise(Mixlib::ShellOut::ShellCommandFailed) - expect { @provider.send(:read_crontab) }.to raise_error(Mixlib::ShellOut::ShellCommandFailed) + expect { @provider.send(:read_crontab) }.to raise_error(Chef::Exceptions::Cron) end end @@ -938,7 +938,7 @@ MAILTO=foo@example.com allow(@provider).to receive(:shell_out!).and_raise(Mixlib::ShellOut::ShellCommandFailed) expect do @provider.send(:write_crontab, "Foo") - end.to raise_error(Mixlib::ShellOut::ShellCommandFailed) + end.to raise_error(Chef::Exceptions::Cron) end end diff --git a/spec/unit/provider/service/debian_service_spec.rb b/spec/unit/provider/service/debian_service_spec.rb index 3a532ae216..190ffc4a83 100644 --- a/spec/unit/provider/service/debian_service_spec.rb +++ b/spec/unit/provider/service/debian_service_spec.rb @@ -98,6 +98,7 @@ describe Chef::Provider::Service::Debian do context "when update-rc.d fails" do before do @status = double("Status", :exitstatus => -1) + allow(@provider).to receive(:shell_out!).and_return(@status) end it "raises an error" do |