aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/support
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/test/support')
-rw-r--r--Library/Homebrew/test/support/helper/mktmpdir.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/Library/Homebrew/test/support/helper/mktmpdir.rb b/Library/Homebrew/test/support/helper/mktmpdir.rb
new file mode 100644
index 000000000..f08fd386b
--- /dev/null
+++ b/Library/Homebrew/test/support/helper/mktmpdir.rb
@@ -0,0 +1,11 @@
+module Test
+ module Helper
+ module MkTmpDir
+ def mktmpdir(prefix_suffix = nil)
+ new_dir = Pathname.new(Dir.mktmpdir(prefix_suffix, HOMEBREW_TEMP))
+ return yield new_dir if block_given?
+ new_dir
+ end
+ end
+ end
+end