From 78288f75e127182751938353ef3005a29d9c3bc1 Mon Sep 17 00:00:00 2001 From: utilum Date: Sun, 13 May 2018 18:00:54 +0200 Subject: remove unnecessary mocking in ActionCable tests --- actioncable/test/connection/multiple_identifiers_test.rb | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'actioncable/test/connection/multiple_identifiers_test.rb') diff --git a/actioncable/test/connection/multiple_identifiers_test.rb b/actioncable/test/connection/multiple_identifiers_test.rb index 7f90cb3876..51716410b2 100644 --- a/actioncable/test/connection/multiple_identifiers_test.rb +++ b/actioncable/test/connection/multiple_identifiers_test.rb @@ -16,20 +16,15 @@ class ActionCable::Connection::MultipleIdentifiersTest < ActionCable::TestCase test "multiple connection identifiers" do run_in_eventmachine do - open_connection_with_stubbed_pubsub + open_connection + assert_equal "Room#my-room:User#lifo", @connection.connection_identifier end end private - def open_connection_with_stubbed_pubsub + def open_connection server = TestServer.new - server.stubs(:pubsub).returns(stub_everything("pubsub")) - - open_connection server: server - end - - def open_connection(server:) env = Rack::MockRequest.env_for "/test", "HTTP_HOST" => "localhost", "HTTP_CONNECTION" => "upgrade", "HTTP_UPGRADE" => "websocket" @connection = Connection.new(server, env) -- cgit v1.2.3