molecule: use assert_predicate instead of File.exist?

This commit is contained in:
ilovezfs 2017-10-06 04:04:18 -07:00
parent 2d47f6bdff
commit e88fbaf666

View file

@ -278,8 +278,8 @@ class Molecule < Formula
test do
# Test the Vagrant driver
system bin/"molecule", "init", "--role", "foo-vagrant", "--driver", "vagrant", "--verifier", "testinfra"
assert File.exist?(testpath/"foo-vagrant/molecule.yml"), "Failed to create 'foo-vagrant/molecule.yml' file!"
assert File.exist?(testpath/"foo-vagrant/tests/test_default.py"), "Failed to create 'foo-vagrant/tests/test_default.py' file!"
assert_predicate testpath/"foo-vagrant/molecule.yml", :exist?, "Failed to create 'foo-vagrant/molecule.yml' file!"
assert_predicate testpath/"foo-vagrant/tests/test_default.py", :exist?, "Failed to create 'foo-vagrant/tests/test_default.py' file!"
cd "foo-vagrant" do
system bin/"molecule", "list"
end