summaryrefslogtreecommitdiff
path: root/test/ipaddress/ipv6_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ipaddress/ipv6_test.rb')
-rw-r--r--test/ipaddress/ipv6_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ipaddress/ipv6_test.rb b/test/ipaddress/ipv6_test.rb
index dcfb601..60f01eb 100644
--- a/test/ipaddress/ipv6_test.rb
+++ b/test/ipaddress/ipv6_test.rb
@@ -254,6 +254,12 @@ class IPv6Test < Minitest::Test
arr = ["2001:db8:1::1/64","2001:db8:1::1/65",
"2001:db8:1::2/64","2001:db8:2::1/64"]
assert_equal arr, [ip1,ip2,ip3,ip4].sort.map{|s| s.to_string}
+ # compare with alien thing
+ ip1 = @klass.new('::1')
+ ip2 = IPAddress::IPv4.new('127.0.0.1')
+ not_ip = String
+ assert_equal nil, ip1 <=> ip2
+ assert_equal nil, ip1 <=> not_ip
end
def test_classmethod_expand