test/answer_test.rb in whois-1.1.2 vs test/answer_test.rb in whois-1.1.3

- old
+ new

@@ -48,16 +48,28 @@ def test_match? assert @answer.match?(/domain\.foo/) assert !@answer.match?(/google/) end - def test_equality_check_self - assert_equal @answer, @answer + def test_equality_with_check_self + assert_equal @answer, @answer assert @answer.eql?(@answer) end - def test_equality_check_string + def test_equality_with_check_self_class + assert_equal @answer, @answer.dup + assert @answer.eql?(@answer.dup) + end + + def test_equality_with_check_self_subclass + child = Class.new(@klass) + + assert_equal @answer, child.new(@answer.server, @answer.parts) + assert @answer.eql?(child.new(@answer.server, @answer.parts)) + end + + def test_equality_with_check_string assert_equal @answer, @content assert_not_equal @content, @answer assert @answer.eql?(@content) assert !@content.eql?(@answer) end @@ -110,9 +122,10 @@ assert answer.property_supported?(:created_on) assert !answer.property_supported?(:updated_on) assert !answer.property_supported?(:expires_on) end + # DEPRECATED def test_properties answer = @klass.new(nil, [Whois::Answer::Part.new("", "whois.parser.fake")]) properties = answer.properties assert_equal Whois::Answer::Parser.properties.size, properties.keys.size \ No newline at end of file