Sha256: cd0c9b0ca9ad1fd52a0b4e4241d43eb5783b98a636d0db7c3c64e52170ced9d1

Contents?: true

Size: 554 Bytes

Versions: 1

Compression:

Stored size: 554 Bytes

Contents

require 'test_helper'
require 'whois/answer/parser/base'

class AnswerParserBaseTest < Test::Unit::TestCase

  def setup
    @klass  = Whois::Answer::Parser::Base
    @part   = Whois::Answer::Part.new("This is the response.", "whois.foo.com")
  end


  def test_initialize
    parser = @klass.new(@part)
    assert_instance_of @klass, parser
  end

  def test_initialize_should_require_part
    assert_raise(ArgumentError) { @klass.new }
  end


  def test_content
    parser = @klass.new(@part)
    assert_equal @part.response, parser.content
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
whois-0.8.0 test/answer/parser/base_test.rb