ffmpegthumbnailer: use assert_predicate instead of File.exist?

This commit is contained in:
ilovezfs 2017-10-06 02:08:04 -07:00
parent 31ef6045a1
commit 18c815e026

View file

@ -37,8 +37,8 @@ class Ffmpegthumbnailer < Formula
png = test_fixtures("test.png")
system f.to_s, "-loop", "1", "-i", png.to_s, "-c:v", "libx264", "-t", "30",
"-pix_fmt", "yuv420p", "v.mp4"
assert File.exist?("v.mp4"), "Failed to generate source video!"
assert_predicate testpath/"v.mp4", :exist?, "Failed to generate source video!"
system "#{bin}/ffmpegthumbnailer", "-i", "v.mp4", "-o", "out.jpg"
assert File.exist?("out.jpg"), "Failed to create thumbnail!"
assert_predicate testpath/"out.jpg", :exist?, "Failed to create thumbnail!"
end
end