diff options
author | Jon Moss <me@jonathanmoss.me> | 2016-05-27 13:07:13 -0400 |
---|---|---|
committer | Jon Moss <me@jonathanmoss.me> | 2016-05-31 13:06:08 -0400 |
commit | 66901c1849efae74c8a58fe0cb36afd487c067cc (patch) | |
tree | ee8c16cfe1668d937fc6f04cf450e9e7f7aacc78 /actioncable/test/javascript/src/test_helpers | |
parent | 998bbbcc0e043e16b96613387cdb8f0ee4784ff2 (diff) | |
download | rails-66901c1849efae74c8a58fe0cb36afd487c067cc.tar.gz rails-66901c1849efae74c8a58fe0cb36afd487c067cc.tar.bz2 rails-66901c1849efae74c8a58fe0cb36afd487c067cc.zip |
Add configuration for `WebSocket` and `logger`
[Javan Makhmali, Jon Moss]
Diffstat (limited to 'actioncable/test/javascript/src/test_helpers')
-rw-r--r-- | actioncable/test/javascript/src/test_helpers/mock_websocket.coffee | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/actioncable/test/javascript/src/test_helpers/mock_websocket.coffee b/actioncable/test/javascript/src/test_helpers/mock_websocket.coffee index b7f86f18f6..6508984c37 100644 --- a/actioncable/test/javascript/src/test_helpers/mock_websocket.coffee +++ b/actioncable/test/javascript/src/test_helpers/mock_websocket.coffee @@ -1,12 +1,10 @@ #= require mock-socket -NativeWebSocket = window.WebSocket - server = null consumer = null ActionCable.TestHelpers.createConsumer = (url, callback) -> - window.WebSocket = MockWebSocket + ActionCable.WebSocket = MockWebSocket server = new MockServer url consumer = ActionCable.createConsumer(url) callback(consumer, server) @@ -18,4 +16,3 @@ QUnit.testDone -> if server? server.clients().forEach (client) -> client.close() server.close() - window.WebSocket = NativeWebSocket |