Sha256: ce815341cde68b06d50e500e96ee74120dd0ad119d1b3880b15c407bfb6d224a

Contents?: true

Size: 709 Bytes

Versions: 3

Compression:

Stored size: 709 Bytes

Contents

require 'assert'

require 'sanford/server'
require 'sanford/manager'

class Sanford::Server

  class BaseTest < Assert::Context
    desc "Sanford::Server"
    setup do
      @server = Sanford::Server.new(TestHost)
    end
    subject{ @server }

    should "include DatTCP::Server" do
      assert_includes DatTCP::Server, subject.class.included_modules
    end

    should "use the service host's ip and port" do
      assert_equal TestHost.ip,   subject.host
      assert_equal TestHost.port, subject.port
    end

  end

  # Sanford::Server#serve is tested in test/system/request_handling_test.rb,
  # it requires multiple parts of Sanford and basically tests a large portion of
  # the entire system

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sanford-0.4.0 test/unit/server_test.rb
sanford-0.3.0 test/unit/server_test.rb
sanford-0.2.0 test/unit/server_test.rb