Sha256: b27c2671059808244e9749ff425be4887cc224209ed3535c1869c04bbc83c35c
Contents?: true
Size: 579 Bytes
Versions: 5
Compression:
Stored size: 579 Bytes
Contents
require "test_helper" class WithoutTldValidationTest < Minitest::Test VALID_HOSTNAMES.each do |host| test "accepts #{host}" do server = ServerWithoutTLD.new(host) assert server.valid? end end INVALID_HOSTNAMES.each do |host| test "rejects #{host}" do server = ServerWithoutTLD.new(host) refute server.valid? end end test "rejects nil hostname" do server = ServerWithoutTLD.new(nil) refute server.valid? end test "rejects blank hostname" do server = ServerWithoutTLD.new("") refute server.valid? end end
Version data entries
5 entries across 5 versions & 1 rubygems