aboutsummaryrefslogblamecommitdiffstats
path: root/actioncable/test/stubs/test_server.rb
blob: 6e6541a952668deb169b148fd6b53aef87aa2444 (plain) (tree)
1
2
3
4
5
6
7
8
9


                 

                                          



                                                                                      
                                                                                

     
            
                                          
     


                
   
require 'ostruct'

class TestServer
  include ActionCable::Server::Connections

  attr_reader :logger, :config

  def initialize
    @logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
    @config = OpenStruct.new(log_tags: [], subscription_adapter: SuccessAdapter)
  end

  def pubsub
    @config.subscription_adapter.new(self)
  end

  def send_async
  end
end