Sha256: 691c5e7316549e372973eaf7ba747f83f511763be08a4800316bb9fbac75c9d8

Contents?: true

Size: 633 Bytes

Versions: 12

Compression:

Stored size: 633 Bytes

Contents

# encoding: utf-8

shared_examples 'IceNine::Freezer::Hash.deep_freeze' do
  it_behaves_like 'IceNine::Freezer::Object.deep_freeze'

  it 'freezes each key' do
    expect(subject.keys.select(&:frozen?)).to eql(subject.keys)
  end

  it 'freezes each value' do
    expect(subject.values.select(&:frozen?)).to eql(subject.values)
  end

  if RUBY_VERSION >= '1.9' && RUBY_ENGINE == 'rbx'
    it 'does not freeze the state' do
      expect(subject.instance_variable_get(:@state)).to_not be_frozen
    end

    it 'does not freeze the entries' do
      expect(subject.instance_variable_get(:@entries)).to_not be_frozen
    end
  end
end

Version data entries

12 entries across 10 versions & 4 rubygems

Version Path
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/ice_nine-0.11.2/spec/shared/hash_deep_freeze.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/ice_nine-0.11.2/spec/shared/hash_deep_freeze.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/ice_nine-0.11.2/spec/shared/hash_deep_freeze.rb
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/ice_nine-0.11.2/spec/shared/hash_deep_freeze.rb
grape-extra_validators-1.0.0 vendor/bundle/ruby/2.4.0/gems/ice_nine-0.11.2/spec/shared/hash_deep_freeze.rb
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/ice_nine-0.11.2/spec/shared/hash_deep_freeze.rb
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/ice_nine-0.11.2/spec/shared/hash_deep_freeze.rb
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/ice_nine-0.11.2/spec/shared/hash_deep_freeze.rb
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/ice_nine-0.11.2/spec/shared/hash_deep_freeze.rb
ice_nine-0.11.2 spec/shared/hash_deep_freeze.rb
ice_nine-0.11.1 spec/shared/hash_deep_freeze.rb
ice_nine-0.11.0 spec/shared/hash_deep_freeze_shared_spec.rb