From 18c815e0263b92ac11cd1aae338f0dcb28475b73 Mon Sep 17 00:00:00 2001 From: ilovezfs Date: Fri, 6 Oct 2017 02:08:04 -0700 Subject: [PATCH] ffmpegthumbnailer: use assert_predicate instead of File.exist? --- Formula/ffmpegthumbnailer.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Formula/ffmpegthumbnailer.rb b/Formula/ffmpegthumbnailer.rb index f9caa4e870..172a54b385 100644 --- a/Formula/ffmpegthumbnailer.rb +++ b/Formula/ffmpegthumbnailer.rb @@ -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