use less ruby in tests and hopefully eliminating last place where 'Errno::EBADF: Bad file descriptor' happened