From b9738a8c4c92306120961e89ca69a8d820d2ae37 Mon Sep 17 00:00:00 2001 From: Gilles Cornu Date: Tue, 17 Nov 2015 08:00:24 +0100 Subject: [PATCH] provisioners/ansible: add missing unit test Related to #5292 --- .../provisioners/ansible/provisioner_test.rb | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/test/unit/plugins/provisioners/ansible/provisioner_test.rb b/test/unit/plugins/provisioners/ansible/provisioner_test.rb index dbcfe7d4f..fcc99cccb 100644 --- a/test/unit/plugins/provisioners/ansible/provisioner_test.rb +++ b/test/unit/plugins/provisioners/ansible/provisioner_test.rb @@ -678,7 +678,20 @@ VF # Special cases related to the Vagrant Host operating system in use # - context "with a Solaris-like host" do + context "on a Windows host" do + before do + Vagrant::Util::Platform.stub(windows?: true) + machine.ui.stub(:warn) + end + + it "warns that Windows is not officially supported for the Ansible control machine" do + expect(machine.env.ui).to receive(:warn).with { |warning| + expect(warning).to eq(I18n.t("vagrant.provisioners.ansible.windows_not_supported_for_control_machine")) + } + end + end + + context "on a Solaris-like host" do before do Vagrant::Util::Platform.stub(solaris?: true) end