From 5712d822a381b7b398aaf16dbd686754761cc7a7 Mon Sep 17 00:00:00 2001 From: Javier Aranda Date: Mon, 4 Mar 2024 20:59:37 +0100 Subject: [PATCH] Replace assert_equal nil with assert_nil in tests --- test/ipaddress/ipv4_test.rb | 4 ++-- test/ipaddress/ipv6_test.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/ipaddress/ipv4_test.rb b/test/ipaddress/ipv4_test.rb index 5e8d5a9..d5ce1ab 100644 --- a/test/ipaddress/ipv4_test.rb +++ b/test/ipaddress/ipv4_test.rb @@ -404,8 +404,8 @@ def test_method_compare ip1 = @klass.new('127.0.0.1') ip2 = IPAddress::IPv6.new('::1') not_ip = String - assert_equal nil, ip1 <=> ip2 - assert_equal nil, ip1 <=> not_ip + assert_nil ip1 <=> ip2 + assert_nil ip1 <=> not_ip end def test_method_minus diff --git a/test/ipaddress/ipv6_test.rb b/test/ipaddress/ipv6_test.rb index 294d5fa..ed6c47a 100644 --- a/test/ipaddress/ipv6_test.rb +++ b/test/ipaddress/ipv6_test.rb @@ -341,8 +341,8 @@ def test_method_compare 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 + assert_nil ip1 <=> ip2 + assert_nil ip1 <=> not_ip end def test_classmethod_expand