Method: ActionCable::TestHelper#before_setup

Defined in:
actioncable/lib/action_cable/test_helper.rb

#before_setupObject

:nodoc:



8
9
10
11
12
13
14
15
16
# File 'actioncable/lib/action_cable/test_helper.rb', line 8

def before_setup # :nodoc:
  server = ActionCable.server
  test_adapter = ActionCable::SubscriptionAdapter::Test.new(server)

  @old_pubsub_adapter = server.pubsub

  server.instance_variable_set(:@pubsub, test_adapter)
  super
end