Fixed Windows test code style to use more elegant tap method

This commit is contained in:
Shawn Neal 2014-04-23 16:12:27 -07:00
parent eae3f3243e
commit 59c140ab82
2 changed files with 6 additions and 6 deletions

View File

@ -12,9 +12,9 @@ describe VagrantPlugins::CommunicatorWinRM::Communicator do
let(:shell) { double("shell") }
subject do
comm = described_class.new(machine)
allow(comm).to receive(:create_shell).and_return(shell)
comm
described_class.new(machine).tap do |comm|
allow(comm).to receive(:create_shell).and_return(shell)
end
end
describe ".ready?" do

View File

@ -8,9 +8,9 @@ describe VagrantPlugins::CommunicatorWinRM::WinRMShell do
let(:session) { double("winrm_session") }
subject do
comm = described_class.new('localhost', 'username', 'password')
allow(comm).to receive(:new_session).and_return(session)
comm
described_class.new('localhost', 'username', 'password').tap do |comm|
allow(comm).to receive(:new_session).and_return(session)
end
end
describe ".powershell" do