From 73e58f3098534db6250da2a1b567636f926bb909 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Gomes?= Date: Thu, 14 Aug 2014 17:37:47 +0100 Subject: [PATCH] Small fix to service account spec with JRuby >= 1.9 --- spec/google/api_client/service_account_spec.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/spec/google/api_client/service_account_spec.rb b/spec/google/api_client/service_account_spec.rb index c1dd8754c..f700dfe19 100644 --- a/spec/google/api_client/service_account_spec.rb +++ b/spec/google/api_client/service_account_spec.rb @@ -20,14 +20,18 @@ fixtures_path = File.expand_path('../../../fixtures', __FILE__) describe Google::APIClient::KeyUtils do it 'should read PKCS12 files from the filesystem' do - pending "Reading from PKCS12 not supported on jruby" if RUBY_PLATFORM == 'java' + if RUBY_PLATFORM == 'java' && RUBY_VERSION.start_with?('1.8') + pending "Reading from PKCS12 not supported on jruby 1.8.x" + end path = File.expand_path('files/privatekey.p12', fixtures_path) key = Google::APIClient::KeyUtils.load_from_pkcs12(path, 'notasecret') expect(key).not_to eq(nil) end it 'should read PKCS12 files from loaded files' do - pending "Reading from PKCS12 not supported on jruby" if RUBY_PLATFORM == 'java' + if RUBY_PLATFORM == 'java' && RUBY_VERSION.start_with?('1.8') + pending "Reading from PKCS12 not supported on jruby 1.8.x" + end path = File.expand_path('files/privatekey.p12', fixtures_path) content = File.read(path) key = Google::APIClient::KeyUtils.load_from_pkcs12(content, 'notasecret')