From 15e74e264d0f5c7bdd60eb504b1e32eecc86d74c Mon Sep 17 00:00:00 2001 From: Gilles Cornu Date: Tue, 29 Aug 2017 05:40:25 +0200 Subject: [PATCH] provisioners/ansible: Fix test stubs Make the stubbed valid and invalid Ansible versions closer to the real "ansible --version" stdout output. --- test/unit/plugins/provisioners/ansible/provisioner_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/plugins/provisioners/ansible/provisioner_test.rb b/test/unit/plugins/provisioners/ansible/provisioner_test.rb index a63723a03..7e8c3aaaa 100644 --- a/test/unit/plugins/provisioners/ansible/provisioner_test.rb +++ b/test/unit/plugins/provisioners/ansible/provisioner_test.rb @@ -319,7 +319,7 @@ VF valid_versions.each_pair do |ansible_version, mode| describe "and ansible version #{ansible_version}" do before do - allow(subject).to receive(:gather_ansible_version).and_return("ansible #{ansible_version}") + allow(subject).to receive(:gather_ansible_version).and_return("ansible #{ansible_version}\n...\n") end it "detects the compatibility mode #{mode}" do @@ -339,7 +339,7 @@ VF invalid_versions = [ "ansible devel", - "ansible 2.x.y.z", + "ansible 2.x.y.z\n...\n", "2.9.2.1", ] invalid_versions.each do |unknown_ansible_version|