gpg_spec: use new version method to directly compare version objects

This commit is contained in:
JCount 2017-04-07 16:26:19 -04:00
parent 889d61660a
commit 43b64bfed1

View File

@ -12,14 +12,12 @@ describe Gpg do
shutup do shutup do
subject.create_test_key(dir) subject.create_test_key(dir)
gpg = subject::GPG_EXECUTABLE
@version = Utils.popen_read(gpg, "--version")[/\d\.\d/, 0]
end end
if @version.to_s.start_with?("2.1") if subject.version == Version.create("2.0")
expect(dir/".gnupg/pubring.kbx").to be_file expect(dir/".gnupg/secring.gpg").to be_a_file
else else
expect(dir/".gnupg/secring.gpg").to be_file expect(dir/".gnupg/pubring.kbx").to be_a_file
end end
end end
end end