provisioners/ansible: update specs after [GH-3436]

This commit is contained in:
Gilles Cornu 2014-04-12 08:29:40 +02:00
parent baf0649dcf
commit ad038890bb
1 changed files with 4 additions and 3 deletions

View File

@ -46,7 +46,8 @@ VF
}}
let(:existing_file) { File.expand_path(__FILE__) }
let(:generated_inventory_file) { File.join(machine.env.local_data_path, %w(provisioners ansible inventory vagrant_ansible_inventory)) }
let(:generated_inventory_dir) { File.join(machine.env.local_data_path, %w(provisioners ansible inventory)) }
let(:generated_inventory_file) { File.join(generated_inventory_dir, 'vagrant_ansible_inventory') }
before do
machine.stub(ssh_info: ssh_info)
@ -163,9 +164,9 @@ VF
}
end
it "uses the auto-generated inventory file" do
it "sets as ansible inventory the directory containing the auto-generated inventory file" do
expect(Vagrant::Util::Subprocess).to receive(:execute).with { |*args|
inventory_index = args.rindex("--inventory-file=#{generated_inventory_file}")
inventory_index = args.rindex("--inventory-file=#{generated_inventory_dir}")
expect(inventory_index).to be > 0
expect(find_last_argument_after(inventory_index, args, /--inventory-file=\w+/)).to be_false
}