blob: 6387ee1d2ab4478693c6fa8abbe81c7b0766ddf8 [file]
require_relative "test_helper"
require "open-uri"
class OpenURISingletonTest < Test::Unit::TestCase
include TestHelper
library "open-uri"
testing "singleton(::URI)"
def test_URI_open
assert_send_type "(String) -> StringIO",
URI, :open, "https://www.ruby-lang.org"
assert_send_type "(String) { (StringIO) -> String } -> String",
URI, :open, "https://www.ruby-lang.org" do |io| io.read end
end
end