Sha256: 10246d2ac74148fb9d46e3e00df7cc5abcf6d548dd53b524168fec5c0a21b232
Contents?: true
Size: 494 Bytes
Versions: 2
Compression:
Stored size: 494 Bytes
Contents
require 'spec_helper' describe HTTP::Request do describe "headers" do subject { HTTP::Request.new(:get, "http://example.com/", :accept => "text/html") } it "sets explicit headers" do expect(subject["Accept"]).to eq("text/html") end it "sets implicit headers" do expect(subject["Host"]).to eq("example.com") end it "provides a #headers accessor" do expect(subject.headers).to eq("Accept" => "text/html", "Host" => "example.com") end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
http-0.5.0 | spec/http/request_spec.rb |
http-0.5.0.pre2 | spec/http/request_spec.rb |