# File test/test_rc_d.rb, line 216 def test_write_pid_overwrite_dead_process File.open(@store_path, 'w') {|output| output.write(DEAD_PID.to_s + "\n") } @rc_d.write_pid assert_equal(1, @open_call) assert_equal(@store_path, @open_path) assert_equal(File::WRONLY | File::CREAT | File::TRUNC, @open_mode) assert_equal(true, @open_block_given_p) assert((File.exist? @store_path)) assert_equal(SELF_PID.to_s + "\n", File.open(@store_path) {|input| input.read }) assert_equal(0, @proc_alive_call) end