Methods

Attributes

[R] identifiers
[R] logger
[R] server
[R] subscriptions
[R] transmissions

Class Public methods

new(identifiers = {})

📝 Source code
# File actioncable/lib/action_cable/channel/test_case.rb, line 54
      def initialize(identifiers = {})
        @server = ActionCable.server
        @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
🔎 See on GitHub

Instance Public methods

connection_identifier()

📝 Source code
# File actioncable/lib/action_cable/channel/test_case.rb, line 71
      def connection_identifier
        @connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
      end
🔎 See on GitHub

transmit(cable_message)

📝 Source code
# File actioncable/lib/action_cable/channel/test_case.rb, line 67
      def transmit(cable_message)
        transmissions << cable_message.with_indifferent_access
      end
🔎 See on GitHub