test/net/dns/test_rr.rb in net-dns-0.2.5 vs test/net/dns/test_rr.rb in net-dns-0.3
- old
+ new
@@ -31,10 +31,12 @@
@a_data = @a.data
@a_binary = Net::DNS::RR.parse(@a_data)
@mx_data = @mx.data
@mx_binary = Net::DNS::RR.parse(@mx_data)
+
+ @array = [@name,@ttl,@cls,@type,@rdata]
end
def test_classes
assert_instance_of Net::DNS::RR::A, @a
@@ -114,9 +116,12 @@
assert_equal(@ttl, @a_string.ttl)
assert_equal(@rdata, @a_string.address.to_s)
assert_equal(@a_data, @a_binary.data)
assert_equal(@mx_data, @mx_binary.data)
+
+ assert_equal(@str, @a_hash.to_s)
+ assert_equal(@array, @a_hash.to_a)
end
def test_range
assert_raise(RRArgumentError) do
Net::DNS::RR.new("google.com. 10800 IM A")