spec/rubydns/resolver_spec.rb in rubydns-0.9.3 vs spec/rubydns/resolver_spec.rb in rubydns-0.9.4
- old
+ new
@@ -1,6 +1,6 @@
-#!/usr/bin/env ruby
+#!/usr/bin/env rspec
# Copyright, 2012, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -137,8 +137,16 @@
expect(addresses.size).to be > 0
addresses.each do |address|
expect(address).to be_kind_of(Resolv::IPv4) | be_kind_of(Resolv::IPv6)
end
+ end
+
+ it "should recursively resolve CNAME records" do
+ resolver = RubyDNS::Resolver.new([[:udp, "8.8.8.8", 53], [:tcp, "8.8.8.8", 53]])
+
+ addresses = resolver.addresses_for('www.baidu.com')
+
+ expect(addresses.size).to be > 0
end
end
end