diff options
author | utilum <oz@utilum.com> | 2018-05-31 17:32:52 +0200 |
---|---|---|
committer | utilum <oz@utilum.com> | 2018-05-31 17:48:20 +0200 |
commit | a0ea528b612f9d8cdd14a5b76fdcf6719b7db56a (patch) | |
tree | ce8a134e1e247d5648771ba9260b16721f2e473e /actioncable/test/connection | |
parent | 84854d9d05c10b091a03767359c3c6ccf4450f26 (diff) | |
download | rails-a0ea528b612f9d8cdd14a5b76fdcf6719b7db56a.tar.gz rails-a0ea528b612f9d8cdd14a5b76fdcf6719b7db56a.tar.bz2 rails-a0ea528b612f9d8cdd14a5b76fdcf6719b7db56a.zip |
Use Ruby instead of mocha
Diffstat (limited to 'actioncable/test/connection')
-rw-r--r-- | actioncable/test/connection/identifier_test.rb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/actioncable/test/connection/identifier_test.rb b/actioncable/test/connection/identifier_test.rb index 204197c2a7..a7e23b4cd8 100644 --- a/actioncable/test/connection/identifier_test.rb +++ b/actioncable/test/connection/identifier_test.rb @@ -30,13 +30,16 @@ class ActionCable::Connection::IdentifierTest < ActionCable::TestCase run_in_eventmachine do server = TestServer.new - server.pubsub.expects(:subscribe) - .with("action_cable/User#lifo", kind_of(Proc)) - server.pubsub.expects(:unsubscribe) - .with("action_cable/User#lifo", kind_of(Proc)) - open_connection(server) close_connection + wait_for_async + + %w[subscribe unsubscribe].each do |method| + pubsub_call = server.pubsub.class.class_variable_get "@@#{method}_called" + + assert_equal "action_cable/User#lifo", pubsub_call[:channel] + assert_instance_of Proc, pubsub_call[:callback] + end end end |