aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/test/connection/client_socket_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actioncable/test/connection/client_socket_test.rb')
-rw-r--r--actioncable/test/connection/client_socket_test.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/actioncable/test/connection/client_socket_test.rb b/actioncable/test/connection/client_socket_test.rb
index da72501c8e..9176c7ac8b 100644
--- a/actioncable/test/connection/client_socket_test.rb
+++ b/actioncable/test/connection/client_socket_test.rb
@@ -2,11 +2,8 @@
require "test_helper"
require "stubs/test_server"
-require "active_support/testing/method_call_assertions"
class ActionCable::Connection::ClientSocketTest < ActionCable::TestCase
- include ActiveSupport::Testing::MethodCallAssertions
-
class Connection < ActionCable::Connection::Base
attr_reader :connected, :websocket, :errors
@@ -43,10 +40,11 @@ class ActionCable::Connection::ClientSocketTest < ActionCable::TestCase
# Internal hax = :(
client = connection.websocket.send(:websocket)
- client.instance_variable_get("@stream").expects(:write).raises("foo")
+ client.instance_variable_get("@stream").stub(:write, proc { raise "foo" }) do
- assert_not_called(client, :client_gone) do
- client.write("boo")
+ assert_not_called(client, :client_gone) do
+ client.write("boo")
+ end
end
assert_equal %w[ foo ], connection.errors
end