aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/test/subscription_adapter
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2016-02-14 18:08:46 +0100
committerKasper Timm Hansen <kaspth@gmail.com>2016-02-14 18:08:46 +0100
commit3c96a6eaa42873147d4be4c753981b7e99a2ba4f (patch)
tree5831bddc71ea351d2a5f946218b5977634f958ff /actioncable/test/subscription_adapter
parent6f8f2a2017e09d8d94c70761c70007ce72b984e7 (diff)
parent3ae8eb13cb4967f533339ecddf93e19f06caa6d2 (diff)
downloadrails-3c96a6eaa42873147d4be4c753981b7e99a2ba4f.tar.gz
rails-3c96a6eaa42873147d4be4c753981b7e99a2ba4f.tar.bz2
rails-3c96a6eaa42873147d4be4c753981b7e99a2ba4f.zip
Merge pull request #23505 from kaspth/inject-rails-config-through-railtie
Inject Rails related configuration through Railtie
Diffstat (limited to 'actioncable/test/subscription_adapter')
-rw-r--r--actioncable/test/subscription_adapter/common.rb22
1 files changed, 0 insertions, 22 deletions
diff --git a/actioncable/test/subscription_adapter/common.rb b/actioncable/test/subscription_adapter/common.rb
index 361858784e..b31c2aa36c 100644
--- a/actioncable/test/subscription_adapter/common.rb
+++ b/actioncable/test/subscription_adapter/common.rb
@@ -9,20 +9,7 @@ module CommonSubscriptionAdapterTest
WAIT_WHEN_NOT_EXPECTING_EVENT = 0.2
def setup
- # TODO: ActionCable requires a *lot* of setup at the moment...
- ::Object.const_set(:ApplicationCable, Module.new)
- ::ApplicationCable.const_set(:Connection, Class.new(ActionCable::Connection::Base))
-
- ::Object.const_set(:Rails, Module.new)
- ::Rails.singleton_class.send(:define_method, :root) { Pathname.new(__dir__) }
-
server = ActionCable::Server::Base.new
- server.config = ActionCable::Server::Configuration.new
- inner_logger = Logger.new(StringIO.new).tap { |l| l.level = Logger::UNKNOWN }
- server.config.logger = ActionCable::Connection::TaggedLoggerProxy.new(inner_logger, tags: [])
-
-
- # and now the "real" setup for our test:
server.config.cable = cable_config.with_indifferent_access
adapter_klass = server.config.pubsub_adapter
@@ -34,15 +21,6 @@ module CommonSubscriptionAdapterTest
def teardown
@tx_adapter.shutdown if @tx_adapter && @tx_adapter != @rx_adapter
@rx_adapter.shutdown if @rx_adapter
-
- begin
- ::Object.send(:remove_const, :ApplicationCable)
- rescue NameError
- end
- begin
- ::Object.send(:remove_const, :Rails)
- rescue NameError
- end
end