aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/test/connection/client_socket_test.rb
diff options
context:
space:
mode:
authorutilum <oz@utilum.com>2018-05-27 20:50:04 +0200
committerutilum <oz@utilum.com>2018-05-31 17:48:20 +0200
commit84854d9d05c10b091a03767359c3c6ccf4450f26 (patch)
tree387c5a07d6566fe5e089da9b89fde583a2b40557 /actioncable/test/connection/client_socket_test.rb
parent565ce0eaba233fcdd196c11715a8740bd571fd31 (diff)
downloadrails-84854d9d05c10b091a03767359c3c6ccf4450f26.tar.gz
rails-84854d9d05c10b091a03767359c3c6ccf4450f26.tar.bz2
rails-84854d9d05c10b091a03767359c3c6ccf4450f26.zip
Use minitest/mock instead of mocha
Diffstat (limited to 'actioncable/test/connection/client_socket_test.rb')
-rw-r--r--actioncable/test/connection/client_socket_test.rb7
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