From 2622cd5d2cb322b78229d345d82076a582925ae2 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Thu, 22 Mar 2012 17:40:15 +0000 Subject: Updated a couple of test helpers. --- test/th_mauve_resolv.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test/th_mauve_resolv.rb') diff --git a/test/th_mauve_resolv.rb b/test/th_mauve_resolv.rb index 98b597b..10bdacc 100644 --- a/test/th_mauve_resolv.rb +++ b/test/th_mauve_resolv.rb @@ -14,13 +14,19 @@ module Mauve alias_method :get_ips_for_without_testing, :get_ips_for def get_ips_for_with_testing(host) + lookup = { "test-1.example.com" => %w(1.2.3.4 2001:1:2:3::4), "test-2.example.com" => %w(1.2.3.5 2001:1:2:3::5), "www.example.com" => %w(1.2.3.4), "www2.example.com" => %w(1.2.3.5 2001:2::2) } - lookup[host] || get_ips_for_without_testing(host) + if lookup.has_key?(host) + self.count += lookup[host].length if $debug + lookup[host] + else + get_ips_for_without_testing(host) + end end alias_method :get_ips_for, :get_ips_for_with_testing -- cgit v1.2.1