summaryrefslogtreecommitdiff
path: root/spec/functional
diff options
context:
space:
mode:
authorChris Doherty <cdoherty@getchef.com>2014-09-04 17:17:14 -0700
committerChris Doherty <cdoherty@getchef.com>2014-09-10 16:34:25 -0700
commit7ddbbe164d2621b0d5dbe9cfc98b686b0c320847 (patch)
tree785fc2b5cf1be8eef08eb589a8f5b7ace9638f3b /spec/functional
parent72d81b6e571f7057e7df24d6f0caaf5c70802f04 (diff)
downloadchef-7ddbbe164d2621b0d5dbe9cfc98b686b0c320847.tar.gz
Repair hacky use of rspec.
Diffstat (limited to 'spec/functional')
-rw-r--r--spec/functional/rebooter_spec.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/functional/rebooter_spec.rb b/spec/functional/rebooter_spec.rb
index 3e87d4ee16..24356b90aa 100644
--- a/spec/functional/rebooter_spec.rb
+++ b/spec/functional/rebooter_spec.rb
@@ -43,21 +43,23 @@ describe Chef::Rebooter do
let(:rebooter) { Chef::Rebooter }
- let(:sheller) { Chef::Rebooter::Sheller }
+ let(:sheller) { Chef::Rebooter }
describe '#reboot_if_needed!' do
it 'should call #shell_out! when reboot has been requested' do
run_context.request_reboot(reboot_info)
- expect(sheller).to receive(:shell_out!).once
+ expect(rebooter).to receive(:shell_out!).once
+ expect(rebooter).to receive(:reboot_if_needed!).once.and_call_original
rebooter.reboot_if_needed!(run_context.node)
run_context.cancel_reboot
end
it 'should not call #shell_out! when reboot has not been requested' do
- expect(sheller).to receive(:shell_out!).exactly(0).times
+ expect(rebooter).to receive(:shell_out!).exactly(0).times
+ expect(rebooter).to receive(:reboot_if_needed!).once.and_call_original
rebooter.reboot_if_needed!(run_context.node)
end
end