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:
parent
e4a26cd4f8
commit
2fd779fcd9
2 changed files with 31 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue