cppcheck: use assert_predicate instead of File.exist?

This commit is contained in:
ilovezfs 2017-10-06 03:53:25 -07:00
parent 50c6488fe3
commit dd35c3df90

View file

@ -135,7 +135,7 @@ class Cppcheck < Formula
system "#{bin}/cppcheck", "--dump", test_cpp_file
test_cpp_file_dump = "#{test_cpp_file}.dump"
assert File.exist? test_cpp_file_dump
assert_predicate testpath/test_cpp_file_dump, :exist?
python_addon_output = shell_output "python #{sample_addon_file} #{test_cpp_file_dump}"
assert_match "#{expect_function_names}\n#{expect_token_count}", python_addon_output
end