class ActionCable::Channel::ConnectionStub
Attributes
identifiers[R]
logger[R]
subscriptions[R]
transmissions[R]
Public Class Methods
new(identifiers = {})
click to toggle source
# File lib/action_cable/testing/channel/test_case.rb, line 53 def initialize(identifiers = {}) @transmissions = [] identifiers.each do |identifier, val| define_singleton_method(identifier) { val } end @subscriptions = ActionCable::Connection::Subscriptions.new(self) @identifiers = identifiers.keys @logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new) end
Public Instance Methods
transmit(cable_message)
click to toggle source
# File lib/action_cable/testing/channel/test_case.rb, line 65 def transmit(cable_message) transmissions << cable_message.with_indifferent_access end