class ActionCable::Connection::MultipleIdentifiersTest

Private Instance Methods

open_connection(server:) click to toggle source
# File actioncable/test/connection/multiple_identifiers_test.rb, line 32
def open_connection(server:)
  env = Rack::MockRequest.env_for "/test", "HTTP_HOST" => "localhost", "HTTP_CONNECTION" => "upgrade", "HTTP_UPGRADE" => "websocket"
  @connection = Connection.new(server, env)

  @connection.process
  @connection.send :handle_open
end
open_connection_with_stubbed_pubsub() click to toggle source
# File actioncable/test/connection/multiple_identifiers_test.rb, line 25
def open_connection_with_stubbed_pubsub
  server = TestServer.new
  server.stubs(:pubsub).returns(stub_everything("pubsub"))

  open_connection server: server
end