From ac59da235864cc241d8229eeb06091cb53b82ad3 Mon Sep 17 00:00:00 2001 From: ilovezfs Date: Fri, 6 Oct 2017 02:47:49 -0700 Subject: [PATCH] pyinvoke: use assert_predicate instead of File.exist? --- Formula/pyinvoke.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/pyinvoke.rb b/Formula/pyinvoke.rb index 30a06e283a..4cabacf640 100644 --- a/Formula/pyinvoke.rb +++ b/Formula/pyinvoke.rb @@ -36,7 +36,7 @@ class Pyinvoke < Formula (testpath/"baz").mkpath system bin/"invoke", "clean" assert !File.exist?(testpath/"foo"), "\"pyinvoke clean\" should have deleted \"foo\"" - assert File.exist?(testpath/"baz"), "pyinvoke should have left \"baz\"" + assert_predicate testpath/"baz", :exist?, "pyinvoke should have left \"baz\"" system bin/"invoke", "clean", "--extra=baz" assert !File.exist?(testpath/"foo"), "\"pyinvoke clean-extra\" should have still deleted \"foo\"" assert !File.exist?(testpath/"baz"), "pyinvoke clean-extra should have deleted \"baz\""