Sha256: 98b54b02ef8c98f0ab59cb1e578a829733361a32743bd9520bad2171eb5531dc

Contents?: true

Size: 676 Bytes

Versions: 86

Compression:

Stored size: 676 Bytes

Contents

class CustomActionSubscriber < ActionSubscriber::Base
  def wat
    $messages << payload
  end
end

describe "A subscriber with a custom action", :integration => true do
  let(:draw_routes) do
    ::ActionSubscriber.draw_routes do
      route ::CustomActionSubscriber, :wat,
        :queue => "unrelated_to_the_action",
        :routing_key => "*.javascript_framework"
    end
  end

  it "routes the message to the selected action" do
    ::ActionSubscriber.start_subscribers!
    ::ActivePublisher.publish("react.javascript_framework", "Another?!?!", "events")

    verify_expectation_within(2.0) do
      expect($messages).to eq(Set.new(["Another?!?!"]))
    end
  end
end

Version data entries

86 entries across 86 versions & 1 rubygems

Version Path
action_subscriber-5.3.3-java spec/integration/custom_actions_spec.rb
action_subscriber-5.3.3 spec/integration/custom_actions_spec.rb
action_subscriber-5.3.2-java spec/integration/custom_actions_spec.rb
action_subscriber-5.3.2 spec/integration/custom_actions_spec.rb
action_subscriber-5.3.1-java spec/integration/custom_actions_spec.rb
action_subscriber-5.3.1 spec/integration/custom_actions_spec.rb
action_subscriber-5.3.1.pre-java spec/integration/custom_actions_spec.rb
action_subscriber-5.3.1.pre spec/integration/custom_actions_spec.rb
action_subscriber-5.3.0-java spec/integration/custom_actions_spec.rb
action_subscriber-5.3.0 spec/integration/custom_actions_spec.rb
action_subscriber-5.2.4-java spec/integration/custom_actions_spec.rb
action_subscriber-5.2.4 spec/integration/custom_actions_spec.rb
action_subscriber-5.2.3-java spec/integration/custom_actions_spec.rb
action_subscriber-5.2.3 spec/integration/custom_actions_spec.rb
action_subscriber-5.2.2-java spec/integration/custom_actions_spec.rb
action_subscriber-5.2.2 spec/integration/custom_actions_spec.rb
action_subscriber-5.2.1-java spec/integration/custom_actions_spec.rb
action_subscriber-5.2.1 spec/integration/custom_actions_spec.rb
action_subscriber-5.2.0-java spec/integration/custom_actions_spec.rb
action_subscriber-5.2.0 spec/integration/custom_actions_spec.rb