aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorDominyk Tiller2017-09-01 01:50:26 +0100
committerDominyk Tiller2017-09-01 01:50:26 +0100
commit6d726e1bd6676d97bf41bc800942881cf8c3e78f (patch)
tree476799e8342fe0a0c9d2ca777dec523893c0cc93 /Library
parentc75a8221a5115dc45634ece380266a8a63c0458d (diff)
downloadbrew-6d726e1bd6676d97bf41bc800942881cf8c3e78f.tar.bz2
gpg: create unified test helper
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/gpg.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/Library/Homebrew/gpg.rb b/Library/Homebrew/gpg.rb
index a63207e6c..de2089dda 100644
--- a/Library/Homebrew/gpg.rb
+++ b/Library/Homebrew/gpg.rb
@@ -54,4 +54,13 @@ class Gpg
system gpgconf, "--homedir", "keyrings/live", "--kill",
"gpg-agent"
end
+
+ def self.test(path)
+ create_test_key(path)
+ begin
+ yield
+ ensure
+ cleanup_test_processes!
+ end
+ end
end