aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/test/connection/stream_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actioncable/test/connection/stream_test.rb')
-rw-r--r--actioncable/test/connection/stream_test.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/actioncable/test/connection/stream_test.rb b/actioncable/test/connection/stream_test.rb
index b0419b0994..1e1466af31 100644
--- a/actioncable/test/connection/stream_test.rb
+++ b/actioncable/test/connection/stream_test.rb
@@ -1,9 +1,12 @@
# frozen_string_literal: true
require "test_helper"
+require "active_support/testing/method_call_assertions"
require "stubs/test_server"
class ActionCable::Connection::StreamTest < ActionCable::TestCase
+ include ActiveSupport::Testing::MethodCallAssertions
+
class Connection < ActionCable::Connection::Base
attr_reader :connected, :websocket, :errors
@@ -42,9 +45,10 @@ class ActionCable::Connection::StreamTest < ActionCable::TestCase
# Internal hax = :(
client = connection.websocket.send(:websocket)
client.instance_variable_get("@stream").instance_variable_get("@rack_hijack_io").expects(:write).raises(closed_exception, "foo")
- client.expects(:client_gone)
- client.write("boo")
+ assert_called(client, :client_gone) do
+ client.write("boo")
+ end
assert_equal [], connection.errors
end
end