aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/test/subscription_adapter/channel_prefix.rb
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2019-02-13 00:44:02 +0100
committerGitHub <noreply@github.com>2019-02-13 00:44:02 +0100
commitbc2954d02b7bae0c1ae3a9a647d5cf6699c25b51 (patch)
treeacd23f3be831673cb04a49ef847aff6876c47c57 /actioncable/test/subscription_adapter/channel_prefix.rb
parent7432e251873690234d0d288e8eb009fbee80b635 (diff)
parent3cd69fa2c025da1cc45b1b9b43b227cceb025837 (diff)
downloadrails-bc2954d02b7bae0c1ae3a9a647d5cf6699c25b51.tar.gz
rails-bc2954d02b7bae0c1ae3a9a647d5cf6699c25b51.tar.bz2
rails-bc2954d02b7bae0c1ae3a9a647d5cf6699c25b51.zip
Merge pull request #34714 from palkan/chore/refactor-action-cable-server-config
Action Cable: allow multiple instances of Server::Base with different configs
Diffstat (limited to 'actioncable/test/subscription_adapter/channel_prefix.rb')
-rw-r--r--actioncable/test/subscription_adapter/channel_prefix.rb10
1 files changed, 1 insertions, 9 deletions
diff --git a/actioncable/test/subscription_adapter/channel_prefix.rb b/actioncable/test/subscription_adapter/channel_prefix.rb
index 3071facd9d..475e6cfd3a 100644
--- a/actioncable/test/subscription_adapter/channel_prefix.rb
+++ b/actioncable/test/subscription_adapter/channel_prefix.rb
@@ -2,17 +2,9 @@
require "test_helper"
-class ActionCable::Server::WithIndependentConfig < ActionCable::Server::Base
- # ActionCable::Server::Base defines config as a class variable.
- # Need config to be an instance variable here as we're testing 2 separate configs
- def config
- @config ||= ActionCable::Server::Configuration.new
- end
-end
-
module ChannelPrefixTest
def test_channel_prefix
- server2 = ActionCable::Server::WithIndependentConfig.new
+ server2 = ActionCable::Server::Base.new(config: ActionCable::Server::Configuration.new)
server2.config.cable = alt_cable_config
server2.config.logger = Logger.new(StringIO.new).tap { |l| l.level = Logger::UNKNOWN }