whois 1.0.11 → 1.0.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. data/CHANGELOG.rdoc +9 -0
  2. data/Manifest +9 -0
  3. data/lib/whois/answer/parser/NOTES.txt +1 -1
  4. data/lib/whois/answer/parser/whois.cnnic.net.cn.rb +1 -1
  5. data/lib/whois/answer/parser/whois.dns.lu.rb +1 -1
  6. data/lib/whois/answer/parser/whois.jprs.jp.rb +82 -0
  7. data/lib/whois/answer/parser/whois.registry.in.rb +77 -0
  8. data/lib/whois/version.rb +1 -1
  9. data/test/answer/parser/jobswhois.verisign-grs.com_test.rb +1 -1
  10. data/test/answer/parser/whois.adamsnames.tc_test.rb +1 -1
  11. data/test/answer/parser/whois.aero_test.rb +1 -1
  12. data/test/answer/parser/whois.afilias-grs.info_test.rb +1 -1
  13. data/test/answer/parser/whois.afilias.info_test.rb +1 -1
  14. data/test/answer/parser/whois.ai_test.rb +1 -1
  15. data/test/answer/parser/whois.arnes.si_test.rb +1 -1
  16. data/test/answer/parser/whois.biz_test.rb +1 -1
  17. data/test/answer/parser/whois.cat_test.rb +1 -1
  18. data/test/answer/parser/whois.cira.ca_test.rb +1 -1
  19. data/test/answer/parser/whois.cnnic.cn_test.rb +1 -1
  20. data/test/answer/parser/whois.cnnic.net.cn_test.rb +1 -1
  21. data/test/answer/parser/whois.dk-hostmaster.dk_test.rb +1 -1
  22. data/test/answer/parser/whois.dns.be_test.rb +1 -1
  23. data/test/answer/parser/whois.dns.lu_test.rb +8 -1
  24. data/test/answer/parser/whois.domain-registry.nl_test.rb +1 -1
  25. data/test/answer/parser/whois.domainregistry.ie_test.rb +1 -1
  26. data/test/answer/parser/whois.domreg.lt_test.rb +1 -1
  27. data/test/answer/parser/whois.dotmobiregistry.net_test.rb +1 -1
  28. data/test/answer/parser/whois.educause.edu_test.rb +1 -1
  29. data/test/answer/parser/whois.eu.org_test.rb +1 -1
  30. data/test/answer/parser/whois.eu_test.rb +1 -1
  31. data/test/answer/parser/whois.hkdnr.net.hk_test.rb +1 -1
  32. data/test/answer/parser/whois.iana.org_test.rb +1 -1
  33. data/test/answer/parser/whois.isnic.is_test.rb +1 -1
  34. data/test/answer/parser/whois.jprs.jp_test.rb +86 -0
  35. data/test/answer/parser/whois.meregistry.net_test.rb +1 -1
  36. data/test/answer/parser/whois.museum_test.rb +1 -1
  37. data/test/answer/parser/whois.nic-se.se_test.rb +1 -1
  38. data/test/answer/parser/whois.nic.ac_test.rb +1 -1
  39. data/test/answer/parser/whois.nic.af_test.rb +1 -1
  40. data/test/answer/parser/whois.nic.ag_test.rb +1 -1
  41. data/test/answer/parser/whois.nic.asia_test.rb +1 -1
  42. data/test/answer/parser/whois.nic.at_test.rb +1 -1
  43. data/test/answer/parser/whois.nic.cd_test.rb +1 -1
  44. data/test/answer/parser/whois.nic.ch_test.rb +1 -1
  45. data/test/answer/parser/whois.nic.coop_test.rb +1 -1
  46. data/test/answer/parser/whois.nic.fr_test.rb +1 -1
  47. data/test/answer/parser/whois.nic.gl_test.rb +1 -1
  48. data/test/answer/parser/whois.nic.gov_test.rb +1 -1
  49. data/test/answer/parser/whois.nic.hu_test.rb +1 -1
  50. data/test/answer/parser/whois.nic.im_test.rb +1 -1
  51. data/test/answer/parser/whois.nic.io_test.rb +1 -1
  52. data/test/answer/parser/whois.nic.it_test.rb +1 -1
  53. data/test/answer/parser/whois.nic.lv_test.rb +1 -1
  54. data/test/answer/parser/whois.nic.ly_test.rb +1 -1
  55. data/test/answer/parser/whois.nic.mu_test.rb +1 -1
  56. data/test/answer/parser/whois.nic.mx_test.rb +1 -1
  57. data/test/answer/parser/whois.nic.name_test.rb +1 -1
  58. data/test/answer/parser/whois.nic.nu_test.rb +1 -1
  59. data/test/answer/parser/whois.nic.or.kr_test.rb +1 -1
  60. data/test/answer/parser/whois.nic.tl_test.rb +1 -1
  61. data/test/answer/parser/whois.nic.travel_test.rb +1 -1
  62. data/test/answer/parser/whois.nic.uk_test.rb +1 -1
  63. data/test/answer/parser/whois.nic.us_test.rb +1 -1
  64. data/test/answer/parser/whois.nic.ve_test.rb +1 -1
  65. data/test/answer/parser/whois.norid.no_test.rb +1 -1
  66. data/test/answer/parser/whois.pandi.or.id_test.rb +1 -1
  67. data/test/answer/parser/whois.register.bg_test.rb +1 -1
  68. data/test/answer/parser/whois.registro.br_test.rb +1 -1
  69. data/test/answer/parser/whois.registry.in_test.rb +69 -0
  70. data/test/answer/parser/whois.registrypro.pro_test.rb +1 -1
  71. data/test/answer/parser/whois.ripe.net_test.rb +1 -1
  72. data/test/answer/parser/whois.ripn.net_test.rb +1 -1
  73. data/test/answer/parser/whois.rotld.ro_test.rb +1 -1
  74. data/test/answer/parser/whois.samoanic.ws_test.rb +1 -1
  75. data/test/answer/parser/whois.srs.net.nz_test.rb +1 -1
  76. data/test/answer/parser/whois.za.net_test.rb +1 -1
  77. data/test/answer/parser/whois.za.org_test.rb +1 -1
  78. data/test/list_tld +2 -2
  79. data/test/testcases/responses/whois.dns.lu/property_nameservers_with_ip.txt +55 -0
  80. data/test/testcases/responses/whois.jprs.jp/available.txt +8 -0
  81. data/test/testcases/responses/whois.jprs.jp/registered.txt +30 -0
  82. data/test/testcases/responses/whois.registry.in/available.txt +1 -0
  83. data/test/testcases/responses/whois.registry.in/registered.txt +83 -0
  84. data/whois.gemspec +5 -5
  85. metadata +16 -3
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.eu.org.rb'
2
+ require 'whois/answer/parser/whois.eu.org'
3
3
 
4
4
  class AnswerParserWhoisEuOrgTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.eu.rb'
2
+ require 'whois/answer/parser/whois.eu'
3
3
 
4
4
  class AnswerParserWhoisEuTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.hkdnr.net.hk.rb'
2
+ require 'whois/answer/parser/whois.hkdnr.net.hk'
3
3
 
4
4
  class AnswerParserWhoisHkdnrNetHkTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.iana.org.rb'
2
+ require 'whois/answer/parser/whois.iana.org'
3
3
 
4
4
  class AnswerParserWhoisIanaOrgTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.isnic.is.rb'
2
+ require 'whois/answer/parser/whois.isnic.is'
3
3
 
4
4
  class AnswerParserWhoisIsnicIsTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -0,0 +1,86 @@
1
+ require 'test_helper'
2
+ require 'whois/answer/parser/whois.jprs.jp'
3
+
4
+ class AnswerParserWhoisJprsJpTest < Whois::Answer::Parser::TestCase
5
+
6
+ def setup
7
+ @klass = Whois::Answer::Parser::WhoisJprsJp
8
+ @host = "whois.jprs.jp"
9
+ end
10
+
11
+
12
+ def test_status
13
+ parser = @klass.new(load_part('/registered.txt'))
14
+ expected = "Active"
15
+ assert_equal expected, parser.status
16
+ assert_equal expected, parser.instance_eval { @status }
17
+
18
+ parser = @klass.new(load_part('/available.txt'))
19
+ expected = nil
20
+ assert_equal expected, parser.status
21
+ assert_equal expected, parser.instance_eval { @status }
22
+ end
23
+
24
+ def test_available?
25
+ assert !@klass.new(load_part('/registered.txt')).available?
26
+ assert @klass.new(load_part('/available.txt')).available?
27
+ end
28
+
29
+ def test_registered?
30
+ assert @klass.new(load_part('/registered.txt')).registered?
31
+ assert !@klass.new(load_part('/available.txt')).registered?
32
+ end
33
+
34
+
35
+ def test_created_on
36
+ parser = @klass.new(load_part('/registered.txt'))
37
+ expected = Time.parse("2005-05-30")
38
+ assert_equal expected, parser.created_on
39
+ assert_equal expected, parser.instance_eval { @created_on }
40
+
41
+ parser = @klass.new(load_part('/available.txt'))
42
+ expected = nil
43
+ assert_equal expected, parser.created_on
44
+ assert_equal expected, parser.instance_eval { @created_on }
45
+ end
46
+
47
+ def test_updated_on
48
+ parser = @klass.new(load_part('/registered.txt'))
49
+ # TODO: timezone
50
+ # JST timezone is ignored by Time.parse
51
+ expected = Time.parse("2009-06-01 01:05:04 JST")
52
+ assert_equal expected, parser.updated_on
53
+ assert_equal expected, parser.instance_eval { @updated_on }
54
+
55
+ parser = @klass.new(load_part('/available.txt'))
56
+ expected = nil
57
+ assert_equal expected, parser.updated_on
58
+ assert_equal expected, parser.instance_eval { @updated_on }
59
+ end
60
+
61
+ def test_expires_on
62
+ parser = @klass.new(load_part('/registered.txt'))
63
+ expected = Time.parse("2010-05-31")
64
+ assert_equal expected, parser.expires_on
65
+ assert_equal expected, parser.instance_eval { @expires_on }
66
+
67
+ parser = @klass.new(load_part('/available.txt'))
68
+ expected = nil
69
+ assert_equal expected, parser.expires_on
70
+ assert_equal expected, parser.instance_eval { @expires_on }
71
+ end
72
+
73
+
74
+ def test_nameservers
75
+ parser = @klass.new(load_part('/registered.txt'))
76
+ expected = %w( ns1.google.com ns2.google.com ns3.google.com ns4.google.com )
77
+ assert_equal expected, parser.nameservers
78
+ assert_equal expected, parser.instance_eval { @nameservers }
79
+
80
+ parser = @klass.new(load_part('/available.txt'))
81
+ expected = %w()
82
+ assert_equal expected, parser.nameservers
83
+ assert_equal expected, parser.instance_eval { @nameservers }
84
+ end
85
+
86
+ end
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.meregistry.net.rb'
2
+ require 'whois/answer/parser/whois.meregistry.net'
3
3
 
4
4
  class AnswerParserWhoisMeregistryNetTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.museum.rb'
2
+ require 'whois/answer/parser/whois.museum'
3
3
 
4
4
  class AnswerParserWhoisMuseumTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.nic-se.se.rb'
2
+ require 'whois/answer/parser/whois.nic-se.se'
3
3
 
4
4
  class AnswerParserWhoisNicSeSeTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.ac.rb'
2
+ require 'whois/answer/parser/whois.nic.ac'
3
3
 
4
4
  class AnswerParserWhoisNicAcTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.af.rb'
2
+ require 'whois/answer/parser/whois.nic.af'
3
3
 
4
4
  class AnswerParserWhoisNicAfTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.ag.rb'
2
+ require 'whois/answer/parser/whois.nic.ag'
3
3
 
4
4
  class AnswerParserWhoisNicAgTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.asia.rb'
2
+ require 'whois/answer/parser/whois.nic.asia'
3
3
 
4
4
  class AnswerParserWhoisNicAsiaTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.at.rb'
2
+ require 'whois/answer/parser/whois.nic.at'
3
3
 
4
4
  class AnswerParserWhoisNicAtTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.cd.rb'
2
+ require 'whois/answer/parser/whois.nic.cd'
3
3
 
4
4
  class AnswerParserWhoisNicCdTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.ch.rb'
2
+ require 'whois/answer/parser/whois.nic.ch'
3
3
 
4
4
  class AnswerParserWhoisNicChTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.coop.rb'
2
+ require 'whois/answer/parser/whois.nic.coop'
3
3
 
4
4
  class AnswerParserWhoisNicCoopTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.fr.rb'
2
+ require 'whois/answer/parser/whois.nic.fr'
3
3
 
4
4
  class AnswerParserWhoisNicFrTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.gl.rb'
2
+ require 'whois/answer/parser/whois.nic.gl'
3
3
 
4
4
  class AnswerParserWhoisNicGlTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.gov.rb'
2
+ require 'whois/answer/parser/whois.nic.gov'
3
3
 
4
4
  class AnswerParserWhoisNicGovTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,7 +1,7 @@
1
1
  # coding: utf-8
2
2
 
3
3
  require 'test_helper'
4
- require 'whois/answer/parser/whois.nic.hu.rb'
4
+ require 'whois/answer/parser/whois.nic.hu'
5
5
 
6
6
  class AnswerParserWhoisNicHuTest < Whois::Answer::Parser::TestCase
7
7
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.im.rb'
2
+ require 'whois/answer/parser/whois.nic.im'
3
3
 
4
4
  class AnswerParserWhoisNicImTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.io.rb'
2
+ require 'whois/answer/parser/whois.nic.io'
3
3
 
4
4
  class AnswerParserWhoisNicIoTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.it.rb'
2
+ require 'whois/answer/parser/whois.nic.it'
3
3
 
4
4
  class AnswerParserWhoisNicItTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.lv.rb'
2
+ require 'whois/answer/parser/whois.nic.lv'
3
3
 
4
4
  class AnswerParserWhoisNicLvTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.ly.rb'
2
+ require 'whois/answer/parser/whois.nic.ly'
3
3
 
4
4
  class AnswerParserWhoisNicLyTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.mu.rb'
2
+ require 'whois/answer/parser/whois.nic.mu'
3
3
 
4
4
  class AnswerParserWhoisNicMuTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.mx.rb'
2
+ require 'whois/answer/parser/whois.nic.mx'
3
3
 
4
4
  class AnswerParserWhoisNicMxTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.name.rb'
2
+ require 'whois/answer/parser/whois.nic.name'
3
3
 
4
4
  class AnswerParserWhoisNicNameTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.nu.rb'
2
+ require 'whois/answer/parser/whois.nic.nu'
3
3
 
4
4
  class AnswerParserWhoisNicNuTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.or.kr.rb'
2
+ require 'whois/answer/parser/whois.nic.or.kr'
3
3
 
4
4
  class AnswerParserWhoisNicOrKrTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.tl.rb'
2
+ require 'whois/answer/parser/whois.nic.tl'
3
3
 
4
4
  class AnswerParserWhoisNicTlTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.travel.rb'
2
+ require 'whois/answer/parser/whois.nic.travel'
3
3
 
4
4
  class AnswerParserWhoisNicTravelTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.uk.rb'
2
+ require 'whois/answer/parser/whois.nic.uk'
3
3
 
4
4
  class AnswerParserWhoisNicUkTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.us.rb'
2
+ require 'whois/answer/parser/whois.nic.us'
3
3
 
4
4
  class AnswerParserWhoisNicUsTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.ve.rb'
2
+ require 'whois/answer/parser/whois.nic.ve'
3
3
 
4
4
  class AnswerParserWhoisNicVeTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.norid.no.rb'
2
+ require 'whois/answer/parser/whois.norid.no'
3
3
 
4
4
  class AnswerParserWhoisNoridNoTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.pandi.or.id.rb'
2
+ require 'whois/answer/parser/whois.pandi.or.id'
3
3
 
4
4
  class AnswerParserWhoisPandiOrIdTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.register.bg.rb'
2
+ require 'whois/answer/parser/whois.register.bg'
3
3
 
4
4
  class AnswerParserWhoisRegisterBgTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'whois/answer/parser/whois.registro.br.rb'
2
+ require 'whois/answer/parser/whois.registro.br'
3
3
 
4
4
  class AnswerParserWhoisRegistroBrTest < Whois::Answer::Parser::TestCase
5
5
 
@@ -0,0 +1,69 @@
1
+ require 'test_helper'
2
+ require 'whois/answer/parser/whois.registry.in'
3
+
4
+ class AnswerParserWhoisRegistryInTest < Whois::Answer::Parser::TestCase
5
+
6
+ def setup
7
+ @klass = Whois::Answer::Parser::WhoisRegistryIn
8
+ @host = "whois.registry.in"
9
+ end
10
+
11
+
12
+ def test_status
13
+ parser = @klass.new(load_part('/registered.txt'))
14
+ expected = ["OK"]
15
+ assert_equal expected, parser.status
16
+ assert_equal expected, parser.instance_eval { @status }
17
+
18
+ parser = @klass.new(load_part('/available.txt'))
19
+ expected = []
20
+ assert_equal expected, parser.status
21
+ assert_equal expected, parser.instance_eval { @status }
22
+ end
23
+
24
+ def test_available?
25
+ assert !@klass.new(load_part('/registered.txt')).available?
26
+ assert @klass.new(load_part('/available.txt')).available?
27
+ end
28
+
29
+ def test_registered?
30
+ assert @klass.new(load_part('/registered.txt')).registered?
31
+ assert !@klass.new(load_part('/available.txt')).registered?
32
+ end
33
+
34
+
35
+ def test_created_on
36
+ assert_equal Time.parse("2005-02-14 20:35:14 UTC"),
37
+ @klass.new(load_part('/registered.txt')).created_on
38
+ assert_equal nil,
39
+ @klass.new(load_part('/available.txt')).created_on
40
+ end
41
+
42
+ def test_updated_on
43
+ assert_equal Time.parse("2009-04-06 18:20:09 UTC"),
44
+ @klass.new(load_part('/registered.txt')).updated_on
45
+ assert_equal nil,
46
+ @klass.new(load_part('/available.txt')).updated_on
47
+ end
48
+
49
+ def test_expires_on
50
+ assert_equal Time.parse("2011-02-14 20:35:14 UTC"),
51
+ @klass.new(load_part('/registered.txt')).expires_on
52
+ assert_equal nil,
53
+ @klass.new(load_part('/available.txt')).expires_on
54
+ end
55
+
56
+
57
+ def test_nameservers
58
+ parser = @klass.new(load_part('/registered.txt'))
59
+ expected = %w( ns1.google.com ns2.google.com ns3.google.com ns4.google.com )
60
+ assert_equal expected, parser.nameservers
61
+ assert_equal expected, parser.instance_eval { @nameservers }
62
+
63
+ parser = @klass.new(load_part('/available.txt'))
64
+ expected = %w()
65
+ assert_equal expected, parser.nameservers
66
+ assert_equal expected, parser.instance_eval { @nameservers }
67
+ end
68
+
69
+ end