Sha256: 8cd796480148e397fa5f198daf8e437cf924b56fca0356f186a383276ed7c5a5
Contents?: true
Size: 662 Bytes
Versions: 13
Compression:
Stored size: 662 Bytes
Contents
require 'spec_helper' require 'materialist/event_worker' RSpec.describe Materialist::EventWorker do describe "#perform" do let(:source_url) { 'https://service.dev/foobars/1' } let(:event) {{ 'topic' => :foobar, 'url' => source_url, 'type' => 'noop' }} let!(:materializer_class) { class FoobarMaterializer; end } before do allow(FoobarMaterializer).to receive(:perform) end context "when run synchronously" do let(:perform) { subject.perform(event) } it "calls the relevant materializer" do expect(FoobarMaterializer).to receive(:perform).with(source_url, :noop) perform end end end end
Version data entries
13 entries across 13 versions & 1 rubygems