1 require File.dirname(__FILE__) + '/helper'
3 class TestSocket < Test::Unit::TestCase
6 Object.const_set(:DRb, stub_everything)
10 def test_should_start_a_drb_server
11 DRb.expects(:start_service)
17 def test_should_use_supplied_port_and_host
18 DRb.expects(:start_service).with { |uri, object| uri == "drbunix:///tmp/god.9999.sock" && object.is_a?(God::Socket) }
20 server = God::Socket.new(9999)
24 def test_should_forward_foreign_method_calls_to_god
27 server = God::Socket.new
29 God.expects(:send).with(:something_random)
30 server.something_random
35 def test_ping_should_return_true
38 server = God::Socket.new