diff options
author | Lachlan Sylvester <lachlan.sylvester@publicisfrontfoot.com.au> | 2015-07-28 15:13:07 +1000 |
---|---|---|
committer | Lachlan Sylvester <lachlan.sylvester@publicisfrontfoot.com.au> | 2015-07-30 10:14:57 +1000 |
commit | 60e2fa5e955ce819c90f2081320554b5ed0ee83c (patch) | |
tree | fa0c24e3149a06116079c392f3cea3c3928b05de /test/connection/subscriptions_test.rb | |
parent | 65fde3bf75cf82bf18d8cfa36bc07f52c9a866ff (diff) | |
download | rails-60e2fa5e955ce819c90f2081320554b5ed0ee83c.tar.gz rails-60e2fa5e955ce819c90f2081320554b5ed0ee83c.tar.bz2 rails-60e2fa5e955ce819c90f2081320554b5ed0ee83c.zip |
refactor channel look up to use a hash instead of an array and reduce the number of calls to safe_constantize because it can be slow
Diffstat (limited to 'test/connection/subscriptions_test.rb')
-rw-r--r-- | test/connection/subscriptions_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/connection/subscriptions_test.rb b/test/connection/subscriptions_test.rb index 4e134b6420..24fe8f9300 100644 --- a/test/connection/subscriptions_test.rb +++ b/test/connection/subscriptions_test.rb @@ -20,7 +20,7 @@ class ActionCable::Connection::SubscriptionsTest < ActiveSupport::TestCase setup do @server = TestServer.new - @server.stubs(:channel_classes).returns([ ChatChannel ]) + @server.stubs(:channel_classes).returns(ChatChannel.name => ChatChannel) env = Rack::MockRequest.env_for "/test", 'HTTP_CONNECTION' => 'upgrade', 'HTTP_UPGRADE' => 'websocket' @connection = Connection.new(@server, env) |