2 require 'eventmachine'
\r
5 class TestHandlerCheck < Test::Unit::TestCase
\r
7 class Foo < EM::Connection; end;
\r
8 module TestModule; end;
\r
10 def test_with_correct_class
\r
11 assert_nothing_raised do
\r
13 EM.connect("127.0.0.1", 80, Foo)
\r
19 def test_with_incorrect_class
\r
20 assert_raise(ArgumentError) do
\r
22 EM.connect("127.0.0.1", 80, String)
\r
28 def test_with_module
\r
29 assert_nothing_raised do
\r
31 EM.connect("127.0.0.1", 80, TestModule)
\r