Sha256: a7d52db4baa983f130ce386d6556401c31d91de87857564b798eafa7b662eccd
Contents?: true
Size: 939 Bytes
Versions: 13
Compression:
Stored size: 939 Bytes
Contents
require 'unit/spec_helper' module Infrataster module Contexts describe HttpContext do context "with relative URI resource" do let(:address) { '127.0.0.1' } let(:port) { 80 } let(:resource) { Resources::HttpResource.new('/path/to/resource') } subject { described_class.new(server, resource) } context "with http host definition" do let(:server) { Server.new('example.com', address, http: {:host => 'example.com'}) } it "complements host with server definition" do expect(subject.determine_host(address)).to eq('example.com') end end context "with no http host definition" do let(:server) { Server.new('example.com', address) } it "complements host with ip address" do expect(subject.determine_host(address)).to eq('127.0.0.1') end end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems