Skip to content

Commit

Permalink
Make tests for the JWT::JWK::EC compatible with Ruby 2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
anakinj committed Dec 4, 2020
1 parent fb29072 commit f75404d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions spec/jwk/ec_spec.rb
Expand Up @@ -4,7 +4,7 @@
require 'jwt'

describe JWT::JWK::EC do
let(:ec_key) { OpenSSL::PKey::EC.new("secp384r1").generate_key! }
let(:ec_key) { OpenSSL::PKey::EC.new("secp384r1").generate_key }

describe '.new' do
subject { described_class.new(keypair) }
Expand Down Expand Up @@ -82,7 +82,7 @@
['P-256', 'P-384', 'P-521'].each do |crv|
context "when crv=#{crv}" do
let(:openssl_curve) { JWT::JWK::EC.to_openssl_curve(crv) }
let(:ec_key) { OpenSSL::PKey::EC.new(openssl_curve).generate_key! }
let(:ec_key) { OpenSSL::PKey::EC.new(openssl_curve).generate_key }

context 'when keypair is private' do
let(:include_private) { true }
Expand Down
2 changes: 1 addition & 1 deletion spec/jwk_spec.rb
Expand Up @@ -5,7 +5,7 @@

describe JWT::JWK do
let(:rsa_key) { OpenSSL::PKey::RSA.new(2048) }
let(:ec_key) { OpenSSL::PKey::EC.new("secp384r1").generate_key! }
let(:ec_key) { OpenSSL::PKey::EC.new("secp384r1").generate_key }

describe '.import' do
let(:keypair) { rsa_key.public_key }
Expand Down

0 comments on commit f75404d

Please sign in to comment.