Sha256: ec83cad4283864287e8b3a545876bd18032c6017cec3c0aa62f92d174745e133

Contents?: true

Size: 498 Bytes

Versions: 26

Compression:

Stored size: 498 Bytes

Contents

RSpec.shared_examples 'supports siphon' do
  context "if a siphon is defined" do
    let(:siphon_double) { double(new: siphon_instance) }
    let(:siphon_instance) { double(call: nil) }
    let(:options){ { siphon_events: { payload[0]['topic'] => siphon_double } } }

    it "calls the siphon with the event" do
      perform
      expect(siphon_double).to have_received(:new).with(payload[0]).at_least(:once)
      expect(siphon_instance).to have_received(:call).at_least(:once)
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
routemaster-drain-3.7.1 spec/support/siphon.rb
routemaster-drain-3.7.0 spec/support/siphon.rb
routemaster-drain-3.6.8 spec/support/siphon.rb
routemaster-drain-3.6.7 spec/support/siphon.rb
routemaster-drain-3.6.6 spec/support/siphon.rb
routemaster-drain-3.6.5 spec/support/siphon.rb
routemaster-drain-3.6.4 spec/support/siphon.rb
routemaster-drain-3.6.3 spec/support/siphon.rb
routemaster-drain-3.6.2 spec/support/siphon.rb
routemaster-drain-3.6.1 spec/support/siphon.rb
routemaster-drain-3.6.0 spec/support/siphon.rb
routemaster-drain-3.5.1 spec/support/siphon.rb
routemaster-drain-3.5.0 spec/support/siphon.rb
routemaster-drain-3.4.0 spec/support/siphon.rb
routemaster-drain-3.3.0 spec/support/siphon.rb
routemaster-drain-3.2.0 spec/support/siphon.rb
routemaster-drain-3.1.0 spec/support/siphon.rb
routemaster-drain-3.0.3 spec/support/siphon.rb
routemaster-drain-3.0.2 spec/support/siphon.rb
routemaster-drain-3.0.1 spec/support/siphon.rb