Sha256: edff3acf8fd60df7dc6abf052c7f6382e2feac7ee01a293d90b01f90e2c1a6e9

Contents?: true

Size: 697 Bytes

Versions: 7

Compression:

Stored size: 697 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Adamantium::Freezer, '.get' do
  subject { object.get(name) }

  let(:object) { described_class }

  context 'with :deep' do
    let(:name) { :deep }

    it { should be(Adamantium::Freezer::Deep) }
  end

  context 'with :noop' do
    let(:name) { :noop }

    it { should be(Adamantium::Freezer::Noop) }
  end

  context 'with :flat' do
    let(:name) { :flat }

    it { should be(Adamantium::Freezer::Flat) }
  end

  context 'with unknown name' do
    let(:name) { :other }

    it 'should raise error' do
      expect { subject }.to raise_error(described_class::UnknownFreezerError, 'Freezer with name :other is unknown')
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
adamantium-0.2.0 spec/unit/adamantium/freezer/class_methods/get_spec.rb
adamantium-0.1.0 spec/unit/adamantium/freezer/class_methods/get_spec.rb
adamantium-0.0.11 spec/unit/adamantium/freezer/class_methods/get_spec.rb
adamantium-0.0.10 spec/unit/adamantium/freezer/class_methods/get_spec.rb
adamantium-0.0.9 spec/unit/adamantium/freezer/class_methods/get_spec.rb
adamantium-0.0.8 spec/unit/adamantium/freezer/class_methods/get_spec.rb
adamantium-0.0.7 spec/unit/adamantium/freezer/class_methods/get_spec.rb