aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/test/gpg_spec.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/Library/Homebrew/test/gpg_spec.rb b/Library/Homebrew/test/gpg_spec.rb
index bca807f3b..f0c8f0a3f 100644
--- a/Library/Homebrew/test/gpg_spec.rb
+++ b/Library/Homebrew/test/gpg_spec.rb
@@ -12,11 +12,13 @@ describe Gpg do
shutup do
subject.create_test_key(dir)
+ gpg = subject::GPG_EXECUTABLE
+ @version = Utils.popen_read(gpg, "--version")[/\d\.\d/, 0]
end
- begin
+ if @version.to_s.start_with?("2.1")
expect(dir/".gnupg/pubring.kbx").to be_file
- rescue RSpec::Expectations::ExpectationNotMetError
+ else
expect(dir/".gnupg/secring.gpg").to be_file
end
end