test/answer_test.rb in whois-0.8.0 vs test/answer_test.rb in whois-0.8.1
- old
+ new
@@ -77,16 +77,21 @@
end
def test_parser
answer = @klass.new(nil, [Whois::Answer::Part.new("", "whois.nic.it")])
- assert_instance_of Whois::Answer::Parser,
- answer.parser
+ assert_instance_of Whois::Answer::Parser, answer.parser
answer = @klass.new(nil, [])
- assert_instance_of Whois::Answer::Parser,
- answer.parser
+ assert_instance_of Whois::Answer::Parser, answer.parser
end
+
+ def test_supported?
+ answer = @klass.new(nil, [])
+ answer.parser.expects(:supported?).with(:disclaimer).returns(:value)
+ assert_equal :value, answer.supported?(:disclaimer)
+ end
+
Whois::Answer::Parser.registrable_methods.each do |method|
define_method "test_should_delegate_#{method}_to_parser" do
answer = @klass.new(nil, [Whois::Answer::Part.new("", "whois.nic.it")])
parser = answer.parser
\ No newline at end of file