sstephenson/bats — pull request #44 by blueyed (2014-03-13 21:40:29+00:00)
Title: Use `mktemp -d` for $BATS_TMPDIR

$BATS_TMPDIR should be a non-existent directory.

I have tried to leave the setup of BATS_TMPDIR in bats-exec-test, but
that did not work: the src files behaved very strange:

> …/libexec/bats-exec-test: line 266: /tmp/tmp.PJImwKcCF4/bats.16707.src: No such file or directory

This might be to some traps and/or other specialities.
Feel free to adopt it as it fits best.

Ref: https://github.com/sstephenson/rbenv/pull/562