Sha256: 2ed6bb654561523898f0ac858bee57f0c18e93ab42beb14be523a4dd200ac942

Contents?: true

Size: 550 Bytes

Versions: 86

Compression:

Stored size: 550 Bytes

Contents

class BasicPushSubscriber < ActionSubscriber::Base
  def booked
    $messages << payload
  end
end

describe "A Basic Subscriber", :integration => true do
  let(:draw_routes) do
    ::ActionSubscriber.draw_routes do
      route ::BasicPushSubscriber, :booked
    end
  end

  it "routes messages to the right place" do
    ::ActionSubscriber.start_subscribers!
    ::ActivePublisher.publish("basic_push.booked", "Ohai Booked", "events")

    verify_expectation_within(2.0) do
      expect($messages).to eq(Set.new(["Ohai Booked"]))
    end
  end
end

Version data entries

86 entries across 86 versions & 1 rubygems

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