From d1f58e9922de753b5a6b1dc7a8ff2a6cf9463eeb Mon Sep 17 00:00:00 2001 From: utilum Date: Sun, 22 Apr 2018 22:46:29 +0200 Subject: assert_called_with --- actioncable/test/connection/base_test.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'actioncable/test') diff --git a/actioncable/test/connection/base_test.rb b/actioncable/test/connection/base_test.rb index cbeac1bb3a..ed62e90b70 100644 --- a/actioncable/test/connection/base_test.rb +++ b/actioncable/test/connection/base_test.rb @@ -62,10 +62,11 @@ class ActionCable::Connection::BaseTest < ActionCable::TestCase run_in_eventmachine do connection = open_connection - connection.websocket.expects(:transmit).with({ type: "welcome" }.to_json) - assert_called(connection.message_buffer, :process!) do - connection.process - wait_for_async + assert_called_with(connection.websocket, :transmit, [{ type: "welcome" }.to_json]) do + assert_called(connection.message_buffer, :process!) do + connection.process + wait_for_async + end end assert_equal [ connection ], @server.connections -- cgit v1.2.3