Permalink
Browse files

Undefine all #throttle? methods except the one in Whois::Answer::Pars…

…er::Base.
  • Loading branch information...
1 parent 1932bbd commit 18051e2ae9912138aa1aad6f6153e48860b0739c @weppos committed Jan 28, 2011
View
@@ -199,15 +199,16 @@ def contacts
parser.contacts
end
+
# Checks whether this is a throttle response.
#
# @return [Boolean]
#
# @see Whois::Answer::Parser#throttle?
#
- def throttle?
- parser.throttle?
- end
+ # def throttle?
+ # parser.throttle?
+ # end
private
View
@@ -106,8 +106,7 @@ def unchanged?(other)
end
equal?(other) ||
- parsers.size == other.parsers.size &&
- all_with_args?(parsers, other.parsers) { |one, two| one.unchanged?(two) }
+ parsers.size == other.parsers.size && all_with_args?(parsers, other.parsers) { |one, two| one.unchanged?(two) }
end
# Collects and returns all the contacts from all the answer parts.
@@ -121,6 +120,7 @@ def contacts
parsers.inject([]) { |all, parser| all.concat(parser.contacts) }
end
+
# Loop through all the answer parts to check if at least
# one part is a throttle response.
#
@@ -129,9 +129,9 @@ def contacts
# @see Whois::Answer#throttle?
# @see Whois::Answer::Parser::Base#throttle?
#
- def throttle?
- parsers.any?(&:throttle?)
- end
+ # def throttle?
+ # parsers.any?(&:throttle?)
+ # end
private
@@ -278,6 +278,7 @@ def contacts
contacts.compact
end
+
# Checks whether this is a throttle response.
# The default implementation always returns +nil+.
#
@@ -293,10 +294,6 @@ def throttle?
end
-
-
-
-
protected
def content_for_scanner
@@ -164,6 +164,12 @@ class Whois::Answer::Parser::ParserUnsupportedTest < Whois::Answer::Parser::Base
end
+ # describe "#throttle?" do
+ # it "" do
+ # end
+ # end
+
+
describe ".parser_klass" do
it "returns the parser hostname converted into a class" do
require 'whois/answer/parser/whois.crsnic.net'
View
@@ -304,14 +304,15 @@ class Whois::Answer::Parser::WhoisPropertiesTest < Whois::Answer::Parser::Base
end
end
- describe "#throttle?" do
- it "delegates to #parser" do
- instance = klass.new(nil, @parts)
- instance.parser.expects(:throttle?)
- instance.throttle?
- end
- end
+ # describe "#throttle?" do
+ # it "delegates to #parser" do
+ # i = klass.new(nil, @parts)
+ # i.parser.expects(:throttle?)
+ #
+ # i.throttle?
+ # end
+ # end
describe "method_missing" do

0 comments on commit 18051e2

Please sign in to comment.