TeensyMud - 'A ruby mud server.'

Browse repository
back

test_acceptor.rb

# Code Generated by ZenTest v. 2.3.0
# classname: asrt / meth = ratio%
# Acceptor: 4 / 4 = 100.00%

unless defined? $ZENTEST and $ZENTEST
require 'test/unit'
require 'network/acceptor'
require 'flexmock'
end

class TestAcceptor < Test::Unit::TestCase
def setup
@serv = FlexMock.new
@serv.mock_handle(:register) { true }
@serv.mock_handle(:port) { 9999 }
@acceptor = Acceptor.new(@serv)
end

def test_handle_close
assert_respond_to(@acceptor, :handle_close)
end

def test_handle_input
assert_respond_to(@acceptor, :handle_input)
end

def test_init
assert_equal(true, @acceptor.init)
end
end