ccrypt: use assert_predicate instead of File.exist?

This commit is contained in:
ilovezfs 2017-10-06 02:08:02 -07:00
parent bb05c2ec57
commit 44981d447e

View file

@ -32,11 +32,11 @@ class Ccrypt < Formula
test do
touch "homebrew.txt"
system bin/"ccrypt", "-e", testpath/"homebrew.txt", "-K", "secret"
assert File.exist?("homebrew.txt.cpt")
assert_predicate testpath/"homebrew.txt.cpt", :exist?
assert !File.exist?("homebrew.txt")
system bin/"ccrypt", "-d", testpath/"homebrew.txt.cpt", "-K", "secret"
assert File.exist?("homebrew.txt")
assert_predicate testpath/"homebrew.txt", :exist?
assert !File.exist?("homebrew.txt.cpt")
end
end