Sha256: 0cb47357907d474ccd1f431e787bd6b02724b29dd799ceffe5aee52c0faed9fa

Contents?: true

Size: 704 Bytes

Versions: 3

Compression:

Stored size: 704 Bytes

Contents

require 'spec_helper'

describe Pwwka::Handling do

  class HKlass
    include Pwwka::Handling
  end

  describe "adding handler methods" do

    let(:handling_class) { HKlass.new }
    let(:payload)     { { this: 'that'} }
    let(:routing_key) { 'sf.merch.style.updated' }

    it "should respond to 'send_message!'" do
      expect(Pwwka::Transmitter).to receive(:send_message!).with(payload, routing_key)
      handling_class.send_message!(payload, routing_key)
    end

    it "should respond to 'send_message_safely'" do
      expect(Pwwka::Transmitter).to receive(:send_message_safely).with(payload, routing_key)
      handling_class.send_message_safely(payload, routing_key)
    end

  end


end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pwwka-0.2.0 spec/handling_spec.rb
pwwka-0.1.0 spec/handling_spec.rb
pwwka-0.0.2 spec/handling_spec.rb