Sha256: 0332304649e5218f50df5a5095d7b5877a4d64e729e4090014e9ca9d9893b001

Contents?: true

Size: 589 Bytes

Versions: 3

Compression:

Stored size: 589 Bytes

Contents

RSpec.describe HTTP::URI do
  let(:example_http_uri_string)  { "http://example.com" }
  let(:example_https_uri_string) { "https://example.com" }

  subject(:http_uri)  { described_class.parse(example_http_uri_string) }
  subject(:https_uri) { described_class.parse(example_https_uri_string) }

  it "knows URI schemes" do
    expect(http_uri.scheme).to eq "http"
    expect(https_uri.scheme).to eq "https"
  end

  it "sets default ports for HTTP URIs" do
    expect(http_uri.port).to eq 80
  end

  it "sets default ports for HTTPS URIs" do
    expect(https_uri.port).to eq 443
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
http-2.0.1 spec/lib/http/uri_spec.rb
http-2.0.0 spec/lib/http/uri_spec.rb
http-2.0.0.pre spec/lib/http/uri_spec.rb