Merge pull request #9106 from briancain/fix-rspec-dep-warnings

Update rspec tests to remove deprecation warnings
This commit is contained in:
Brian Cain 2017-10-24 13:08:22 -07:00 committed by GitHub
commit e9fa857f8b
1 changed files with 3 additions and 3 deletions

View File

@ -50,7 +50,7 @@ describe VagrantPlugins::CommunicatorWinRM::Helper do
end end
it "raise an exception if it detects an APIPA" do it "raise an exception if it detects an APIPA" do
machine.stub(ssh_info: { host: "169.254.123.123" }) allow(machine).to receive(:ssh_info).and_return({ host: "169.254.123.123" })
expect { subject.winrm_address(machine) }. expect { subject.winrm_address(machine) }.
to raise_error(VagrantPlugins::CommunicatorWinRM::Errors::WinRMNotReady) to raise_error(VagrantPlugins::CommunicatorWinRM::Errors::WinRMNotReady)
end end
@ -166,12 +166,12 @@ describe VagrantPlugins::CommunicatorWinRM::Helper do
end end
it "returns true if it detects an APIPA" do it "returns true if it detects an APIPA" do
machine.stub(ssh_info: { host: "169.254.123.123" }) allow(machine).to receive(:ssh_info).and_return({ host: "169.254.123.123" })
expect(subject).to be_winrm_info_invalid(machine.ssh_info) expect(subject).to be_winrm_info_invalid(machine.ssh_info)
end end
it "returns false if the IP is valid" do it "returns false if the IP is valid" do
machine.stub(ssh_info: { host: "192.168.123.123" }) allow(machine).to receive(:ssh_info).and_return({ host: "192.168.123.123" })
expect(subject).not_to be_winrm_info_invalid(machine.ssh_info) expect(subject).not_to be_winrm_info_invalid(machine.ssh_info)
end end
end end