Sha256: b555f05ca2a6af48e5951d513510eb60170428f86b17d751238000e951d0174e

Contents?: true

Size: 551 Bytes

Versions: 12

Compression:

Stored size: 551 Bytes

Contents

# encoding: utf-8

require 'spec_helper'
require 'ice_nine'
require 'ice_nine/core_ext/object'

describe IceNine::CoreExt::Object, '#deep_freeze!' do
  subject { value.deep_freeze! }

  let(:value) { Object.new.extend(IceNine::CoreExt::Object) }

  context 'when the object is not frozen' do
    it_behaves_like 'IceNine::Freezer::Object.deep_freeze'
  end

  context 'when the object is frozen' do
    before do
      value.instance_eval { @a = '1' }
      value.freeze
    end

    it_behaves_like 'IceNine::Freezer::NoFreeze.deep_freeze'
  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/unit/ice_nine/core_ext/object/deep_freeze_bang_spec.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/ice_nine-0.11.2/spec/unit/ice_nine/core_ext/object/deep_freeze_bang_spec.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/ice_nine-0.11.2/spec/unit/ice_nine/core_ext/object/deep_freeze_bang_spec.rb
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/ice_nine-0.11.2/spec/unit/ice_nine/core_ext/object/deep_freeze_bang_spec.rb
grape-extra_validators-1.0.0 vendor/bundle/ruby/2.4.0/gems/ice_nine-0.11.2/spec/unit/ice_nine/core_ext/object/deep_freeze_bang_spec.rb
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/ice_nine-0.11.2/spec/unit/ice_nine/core_ext/object/deep_freeze_bang_spec.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/unit/ice_nine/core_ext/object/deep_freeze_bang_spec.rb
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/ice_nine-0.11.2/spec/unit/ice_nine/core_ext/object/deep_freeze_bang_spec.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/unit/ice_nine/core_ext/object/deep_freeze_bang_spec.rb
ice_nine-0.11.2 spec/unit/ice_nine/core_ext/object/deep_freeze_bang_spec.rb
ice_nine-0.11.1 spec/unit/ice_nine/core_ext/object/deep_freeze_bang_spec.rb
ice_nine-0.11.0 spec/unit/ice_nine/core_ext/object/deep_freeze_bang_spec.rb