Fixed Windows test code style to use more elegant tap method
This commit is contained in:
parent
eae3f3243e
commit
59c140ab82
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue