diff options
Diffstat (limited to 'actioncable/test/connection/client_socket_test.rb')
-rw-r--r-- | actioncable/test/connection/client_socket_test.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/actioncable/test/connection/client_socket_test.rb b/actioncable/test/connection/client_socket_test.rb index da72501c8e..07bdc7c52a 100644 --- a/actioncable/test/connection/client_socket_test.rb +++ b/actioncable/test/connection/client_socket_test.rb @@ -43,10 +43,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 |