Sha256: 0816b61609faca6282f9c9cc1f9f2b353247c5e13c1f56b82e78a1643139394d

Contents?: true

Size: 624 Bytes

Versions: 1

Compression:

Stored size: 624 Bytes

Contents

require 'spec_helper'
require 'net/http/server/daemon'

describe Net::HTTP::Server::Daemon do
  subject { described_class }

  describe "#initialize" do
    subject { described_class.new { |request,response| } }

    it "should have a default host" do
      expect(subject.host).to eq(described_class::DEFAULT_HOST)
    end

    it "should have a default port" do
      expect(subject.port).to eq(described_class::DEFAULT_PORT)
    end

    it "should require a HTTP Request handler" do
      expect {
        described_class.new
      }.to raise_error(ArgumentError,"no HTTP Request Handler block given")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
net-http-server-0.2.3 spec/net/http/server/daemon_spec.rb