Sha256: adcab147a5dbcb7c0433d65b0bbc92e8482abb7d8a01c9c181ad54ec7f53b863
Contents?: true
Size: 807 Bytes
Versions: 9
Compression:
Stored size: 807 Bytes
Contents
require_relative '../test_helper' module Paths class HTTPTest < Minitest::Test describe IOStreams::Paths::HTTP do let :url do "http://example.com/index.html?count=10" end let :ssl_url do "https://example.com/index.html?count=10" end describe '.open' do it 'reads http' do result = IOStreams::Paths::HTTP.new(url).read assert_includes result, "<html>" end it 'reads https' do result = IOStreams::Paths::HTTP.new(ssl_url).read assert_includes result, "<html>" end it 'does not support streams' do assert_raises URI::InvalidURIError do io = StringIO.new IOStreams::Paths::HTTP.new(io) end end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems