1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Added version guard for OpenSSL::Config

This commit is contained in:
Nobuyoshi Nakada 2020-03-10 21:47:18 +09:00
parent e4a26cd4f8
commit 2fd779fcd9
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60
2 changed files with 31 additions and 12 deletions

View file

@ -1,20 +1,23 @@
require_relative '../../../spec_helper'
require_relative '../shared/constants'
require_relative '../shared/version'
require 'openssl'
describe "OpenSSL::Config#freeze" do
it "needs to be reviewed for completeness"
openssl_version_is(""..."2.2") do
describe "OpenSSL::Config#freeze" do
it "needs to be reviewed for completeness"
it "freezes" do
c = OpenSSL::Config.new
-> {
c['foo'] = [ ['key', 'value'] ]
}.should_not raise_error
c.freeze
c.frozen?.should be_true
-> {
c['foo'] = [ ['key', 'value'] ]
}.should raise_error(TypeError)
it "freezes" do
c = OpenSSL::Config.new
-> {
c['foo'] = [ ['key', 'value'] ]
}.should_not raise_error
c.freeze
c.frozen?.should be_true
-> {
c['foo'] = [ ['key', 'value'] ]
}.should raise_error(TypeError)
end
end
end