daemonize: use assert_predicate instead of File.exist?
This commit is contained in:
parent
dd35c3df90
commit
2695ec5fb9
1 changed files with 2 additions and 2 deletions
|
@ -30,9 +30,9 @@ class Daemonize < Formula
|
|||
EOS
|
||||
chmod 0700, dummy_script_file
|
||||
system "#{sbin}/daemonize", "-p", pid_file, dummy_script_file
|
||||
assert(File.exist?(pid_file), "The file containing the PID of the child process was not created.")
|
||||
assert_predicate pid_file, :exist?, "The file containing the PID of the child process was not created."
|
||||
sleep(4) # sleep while waiting for the dummy script to finish
|
||||
assert(File.exist?(output_file), "The file which should have been created by the child process doesn't exist.")
|
||||
assert_predicate output_file, :exist?, "The file which should have been created by the child process doesn't exist."
|
||||
assert_match version.to_s, output_file.read
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue