class StimulusReflex::TestCase::TestChannel

Public Class Methods

new(connection_opts = {}) click to toggle source
Calls superclass method
# File lib/stimulus_reflex/test_case.rb, line 8
def initialize(connection_opts = {})
  super("StimulusReflex::Channel")
  @connection = stub_connection(connection_opts.merge(env: {}))
end

Public Instance Methods

stream_name() click to toggle source
# File lib/stimulus_reflex/test_case.rb, line 13
def stream_name
  ids = connection.identifiers.map { |identifier| connection.send(identifier).try(:id) || connection.send(identifier) }
  [
    "StimulusReflex::Channel",
    ids.select(&:present?).join(";")
  ].select(&:present?).join(":")
end