Skip to content
Snippets Groups Projects
Commit 14a7ef59 authored by JCount's avatar JCount
Browse files

gpg_spec: switch structure to if/else instead of rescue

parent 239b873f
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment