diff options
-rw-r--r-- | test/server_test.rb | 33 | ||||
-rw-r--r-- | test/test_helper.rb | 28 |
2 files changed, 0 insertions, 61 deletions
diff --git a/test/server_test.rb b/test/server_test.rb deleted file mode 100644 index bd83953702..0000000000 --- a/test/server_test.rb +++ /dev/null @@ -1,33 +0,0 @@ -require 'test_helper' - -# FIXME: Currently busted. -# -# class ServerTest < ActionCableTest -# class ChatChannel < ActionCable::Channel::Base -# end -# -# class ChatServer < ActionCable::Server::Base -# register_channels ChatChannel -# end -# -# def app -# ChatServer -# end -# -# test "channel registration" do -# assert_equal ChatServer.channel_classes, Set.new([ ChatChannel ]) -# end -# -# test "subscribing to a channel with valid params" do -# ws = Faye::WebSocket::Client.new(websocket_url) -# -# ws.on(:message) do |message| -# puts message.inspect -# end -# -# ws.send command: 'subscribe', identifier: { channel: 'chat'}.to_json -# end -# -# test "subscribing to a channel with invalid params" do -# end -# end diff --git a/test/test_helper.rb b/test/test_helper.rb index 0e0191e804..4b8e66b569 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -15,31 +15,3 @@ ActiveSupport.test_order = :sorted # Require all the stubs and models Dir[File.dirname(__FILE__) + '/stubs/*.rb'].each {|file| require file } - -class ActionCableTest < ActiveSupport::TestCase - PORT = 420420 - - setup :start_puma_server - teardown :stop_puma_server - - def start_puma_server - events = Puma::Events.new(StringIO.new, StringIO.new) - binder = Puma::Binder.new(events) - binder.parse(["tcp://0.0.0.0:#{PORT}"], self) - @server = Puma::Server.new(app, events) - @server.binder = binder - @server.run - end - - def stop_puma_server - @server.stop(true) - end - - def websocket_url - "ws://0.0.0.0:#{PORT}/" - end - - def log(*args) - end - -end |