Update test syntax to remove stubs (#1138)

Use of stubs are deprecated, switch to the newer expect/allow syntax.
This commit is contained in:
Darragh Bailey
2020-08-16 16:06:05 +01:00
committed by GitHub
parent dda5d4e1c4
commit 74c381a30d
4 changed files with 7 additions and 7 deletions

View File

@@ -25,6 +25,6 @@ shared_context 'libvirt' do
# return some information for domain when needed
allow(domain).to receive(:mac).and_return('9C:D5:53:F1:5A:E7')
machine.stub(id: id)
allow(machine).to receive(:id).and_return(id)
end
end

View File

@@ -28,7 +28,7 @@ shared_context 'unit' do
let(:plugin) { register_plugin }
before (:each) do
machine.stub(guest: guest)
machine.stub(communicator: communicator)
allow(machine).to receive(:guest).and_return(guest)
allow(machine).to receive(:communicator).and_return(communicator)
end
end