Sha256: 93032023322398d055de5051cc6ac79c7af13a920a5f94d75314e03893c8f84a

Contents?: true

Size: 741 Bytes

Versions: 10

Compression:

Stored size: 741 Bytes

Contents

# frozen_string_literal: true

describe Spotlight::Etl::Pipeline do
  let(:mock_executor) { instance_double(Spotlight::Etl::Executor, call: 'result', estimated_size: 10) }
  let(:context) { instance_double(Spotlight::Etl::Context) }

  describe '#call' do
    it 'forwards the call to the executor' do
      allow(Spotlight::Etl::Executor).to receive(:new).with(subject, context, cache: nil).and_return(mock_executor)

      expect(subject.call(context)).to eq 'result'
    end
  end

  describe '#estimated_size' do
    it 'forwards the call to the executor' do
      allow(Spotlight::Etl::Executor).to receive(:new).with(subject, context).and_return(mock_executor)

      expect(subject.estimated_size(context)).to eq 10
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
blacklight-spotlight-3.3.0 spec/services/spotlight/etl/pipeline_spec.rb
blacklight-spotlight-3.2.0 spec/services/spotlight/etl/pipeline_spec.rb
blacklight-spotlight-3.1.0 spec/services/spotlight/etl/pipeline_spec.rb
blacklight-spotlight-3.0.3 spec/services/spotlight/etl/pipeline_spec.rb
blacklight-spotlight-3.0.2 spec/services/spotlight/etl/pipeline_spec.rb
blacklight-spotlight-3.0.1 spec/services/spotlight/etl/pipeline_spec.rb
blacklight-spotlight-3.0.0 spec/services/spotlight/etl/pipeline_spec.rb
blacklight-spotlight-3.0.0.rc6 spec/services/spotlight/etl/pipeline_spec.rb
blacklight-spotlight-3.0.0.rc5 spec/services/spotlight/etl/pipeline_spec.rb
blacklight-spotlight-3.0.0.rc4 spec/services/spotlight/etl/pipeline_spec.rb