provisioners/ansible: Fix test stubs

Make the stubbed valid and invalid Ansible versions closer to the real
"ansible --version" stdout output.
This commit is contained in:
Gilles Cornu 2017-08-29 05:40:25 +02:00
parent a327e34861
commit 15e74e264d
No known key found for this signature in database
GPG Key ID: F6BC2CF7E1FE8FFF
1 changed files with 2 additions and 2 deletions

View File

@ -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|