Class: Warren::Handler::Test::Channel

Inherits:
Object
  • Object
show all
Defined in:
lib/warren/handler/test.rb

Overview

Stand in for Broadcast::Channel, provides a store of messages to use in test assertions

Instance Method Summary collapse

Constructor Details

#initialize(warren) ⇒ Channel

Returns a new instance of Channel.



76
77
78
# File 'lib/warren/handler/test.rb', line 76

def initialize(warren)
  @warren = warren
end

Instance Method Details

#<<(message) ⇒ Warren::Handler::Broadcast::Channel

Records ‘message` for testing purposes

Parameters:

  • message (#routing_key, #payload)

    A message should respond to routing_key and payload. @see Warren::Message::Full

Returns:



87
88
89
# File 'lib/warren/handler/test.rb', line 87

def <<(message)
  @warren << message
end