test/test_channel.rb in em-rocketio-client-0.1.1 vs test/test_channel.rb in em-rocketio-client-0.1.2
- old
+ new
@@ -1,8 +1,8 @@
require File.expand_path 'test_helper', File.dirname(__FILE__)
-class TestChannel < MiniTest::Unit::TestCase
+class TestChannel < MiniTest::Test
def test_channel
## client1(comet, channel "aaa") ---> server --> client3(websocket, channel "aaa")
## client2(websocket, channel "bbb") not receive data from channel "aaa"
post_data = {:time => Time.now.to_s, :msg => 'hello!!'}
@@ -32,14 +32,13 @@
client2.close
end
end
EM::defer do
- 50.times do
+ 80.times do
break if res != nil and res3 != nil
sleep 0.1
end
- client.close
EM::stop
end
end
assert res != nil, 'server not respond'
assert res["time"] == post_data[:time]