Sha256: 2fe57fe5db6122d1c262f2584eb9e51bec410831902abcd25f143d71313f2944

Contents?: true

Size: 599 Bytes

Versions: 11

Compression:

Stored size: 599 Bytes

Contents

require 'spec_helper'
require 'materialist/materializer_factory'

RSpec.describe Materialist::MaterializerFactory do
  class BuffaloMozarellaMaterializer; end

  describe '.class_from_topic' do
    subject { described_class.class_from_topic(topic) }

    context 'when the materializer class exists' do
      let(:topic) { 'buffalo_mozarella'}

      it 'returns the class' do
        is_expected.to eql(BuffaloMozarellaMaterializer)
      end
    end

    context 'when the materializer class does not exist' do
      let(:topic) { 'cheddar' }

      it { is_expected.to be nil }
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
materialist-3.8.3 spec/materialist/materializer_factory_spec.rb
materialist-3.8.2 spec/materialist/materializer_factory_spec.rb
materialist-3.8.1 spec/materialist/materializer_factory_spec.rb
materialist-3.8.0 spec/materialist/materializer_factory_spec.rb
materialist-3.7.0 spec/materialist/materializer_factory_spec.rb
materialist-3.6.0 spec/materialist/materializer_factory_spec.rb
materialist-3.5.0 spec/materialist/materializer_factory_spec.rb
materialist-3.4.0 spec/materialist/materializer_factory_spec.rb
materialist-3.3.0 spec/materialist/materializer_factory_spec.rb
materialist-3.2.0 spec/materialist/materializer_factory_spec.rb
materialist-3.1.0 spec/materialist/materializer_factory_spec.rb