TeensyMud - 'A ruby mud server.'

Browse repository
back

test_connector.rb

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

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

class TestConnector < Test::Unit::TestCase
def setup
@serv = FlexMock.new
@serv.mock_handle(:register) { true }
@serv.mock_handle(:service_io) { :sockio }
@serv.mock_handle(:service_filters) { [:colorfilter, :debugfilter] }
@serv.mock_handle(:service_negotiation) { [:supga, :zmp, :echo] }
@serv.mock_handle(:port) { 80 }
@connector = Connector.new(@serv,'google.com')
end

def test_handle_close
assert_respond_to(@connector, :handle_close)
end

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