dns-zonefile 1.0.7 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a1fa74b26db8e77edf6ee64246f6841de34265c3
4
- data.tar.gz: a5965dc7fe66b4405d44715eb405250cca8bcbd1
3
+ metadata.gz: 2827522219ce8faf8c79547c65317965d5a628eb
4
+ data.tar.gz: 9cb7a17d1ee296c80c68e682ee1b4d3a2384232e
5
5
  SHA512:
6
- metadata.gz: a23b7b78cabedf552fb781a2c98a3d66f171326b05556b3bf756ab0c04eb8626607b69dc476a47e7dcd51bffa7885c72a653af5260e9df29843e89d2cd964a0c
7
- data.tar.gz: 02207318222c858dba68c37aac33458ad16f6b888b5cdfd271fc6bec810d4357a98617516653204f4448370725f147726ee40b4d83b0ad2e4723d7feff1db9e5
6
+ metadata.gz: 786c0b7a22598d0f27826ef8c3e7ea8e851e990fedd981f3d88dd112c98a8b483f1c7fd665eddf51a83f60a23360350a81a714699a0a5225c1f2a4482c037e8d
7
+ data.tar.gz: 654452ea27aa6752a3d2a275e93634dee0283c3e3011a782254e83fe73e7fbaa9e88433bc2b0947d3200475aa6c4aca8c05faff34c68c928c8f45ffae3d2c5c1
@@ -1,7 +1,4 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - ruby-head
4
- - 1.9.3
5
- - 1.9.2
6
- - 1.8.7
7
- - ree
4
+ - 2.3.0
@@ -0,0 +1,10 @@
1
+ FROM ruby:2.2.2
2
+
3
+ RUN mkdir -p /u/app
4
+ WORKDIR /u/app
5
+
6
+ EXPOSE 3000
7
+ CMD [ "bundle", "exec", "rake" ]
8
+
9
+ ADD . /u/app
10
+ RUN bundle install --jobs 8
data/Rakefile CHANGED
@@ -4,27 +4,8 @@ require 'rake'
4
4
  require 'rspec/core/rake_task'
5
5
  RSpec::Core::RakeTask.new(:spec)
6
6
 
7
- task :default => [ :generate_grammar, :spec ]
7
+ task :default => [ :spec ]
8
8
 
9
- desc "Regenerate the grammar definition"
10
- task :generate_grammar do
11
- parser_file = 'lib/dns/zonefile/parser.rb'
12
- File.unlink(parser_file) if File.exists?(parser_file)
13
- puts %x[tt doc/zonefile -o #{parser_file}]
14
- source = "require 'treetop'\n\n"
15
- source += "module DNS\n"
16
- source += " module Zonefile\n"
17
- parser_source = File.open(parser_file, 'r').read
18
- parser_source.gsub!(/(\s+)Zonefile$/, '\1ZonefileGrammar # :nodoc:')
19
- parser_source.gsub!(/(\s+)ZonefileParser/, '\1Parser')
20
- source += parser_source.split(/\n/).map { |l| " #{l}".rstrip }.join("\n")
21
- source += "\n end"
22
- source += "\nend"
23
- File.open(parser_file, 'w') do |f|
24
- f.write(source)
25
- end
26
- end
27
-
28
- task :build => [ :generate_grammar, :spec ] do
9
+ task :build do
29
10
  puts %x[gem build dns-zonefile.gemspec]
30
11
  end
@@ -24,7 +24,7 @@ some canonical form.}
24
24
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
25
25
  s.require_paths = ["lib"]
26
26
 
27
- s.add_development_dependency "rspec", "= 2.6"
27
+ s.add_development_dependency "rspec"
28
28
  s.add_development_dependency "rake"
29
29
  s.add_runtime_dependency "treetop"
30
30
  s.add_runtime_dependency "polyglot"
@@ -0,0 +1,4 @@
1
+ rake:
2
+ build: .
3
+ volumes:
4
+ - .:/u/app
@@ -1,11 +1,12 @@
1
- require 'dns/zonefile/parser'
2
- require 'pp'
1
+ require 'dns/zonefile/version'
2
+ require 'treetop'
3
+ Treetop.load 'lib/dns/zonefile'
3
4
 
4
5
  module DNS
5
6
  module Zonefile
6
7
  class << self
7
8
  def parse(zone_string)
8
- parser = DNS::Zonefile::Parser.new
9
+ parser = ZonefileParser.new
9
10
  if result = parser.parse(zone_string)
10
11
  result
11
12
  else
File without changes
@@ -1,5 +1,5 @@
1
1
  module DNS
2
2
  module Zonefile
3
- VERSION = "1.0.7"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
@@ -1,15 +1,13 @@
1
1
  require 'spec_helper'
2
2
  require 'dns/zonefile'
3
3
 
4
- describe "DNS::Zonefile" do
4
+ RSpec.describe "DNS::Zonefile" do
5
5
  it "should be versioned" do
6
- lambda {
7
- DNS::Zonefile.const_get(:VERSION)
8
- }.should_not raise_error
6
+ expect { DNS::Zonefile.const_get(:VERSION) }.to_not raise_error
9
7
  end
10
8
 
11
9
  it "should provide a way of parsing a string" do
12
- DNS::Zonefile.should respond_to(:parse)
10
+ expect(DNS::Zonefile).to respond_to(:parse)
13
11
  end
14
12
 
15
13
  describe "parsing a zonefile string" do
@@ -112,279 +110,279 @@ ZONE
112
110
 
113
111
  it "should set the origin correctly" do
114
112
  zone = DNS::Zonefile.parse(@zonefile)
115
- zone.origin.should eql('@')
113
+ expect(zone.origin).to eq('@')
116
114
  end
117
115
 
118
116
  it "should interpret the origin correctly" do
119
117
  zone = DNS::Zonefile.load(@zonefile)
120
- zone.soa.origin.should eql('example.com.')
118
+ expect(zone.soa.origin).to eq('example.com.')
121
119
  end
122
120
 
123
121
  it "should set the zone variables correctly" do
124
122
  zone = DNS::Zonefile.parse(@zonefile)
125
- zone.variables['TTL'].should eql('86400')
126
- zone.variables['ORIGIN'].should eql('example.com.')
123
+ expect(zone.variables['TTL']).to eq('86400')
124
+ expect(zone.variables['ORIGIN']).to eq('example.com.')
127
125
  end
128
126
 
129
127
  it "should interpret the SOA correctly" do
130
128
  zone = DNS::Zonefile.load(@zonefile)
131
129
  soa = zone.soa
132
- soa.klass.should eql('IN')
133
- soa.ttl.should eql(86400)
134
- soa.nameserver.should eql('ns.example.com.')
135
- soa.responsible_party.should eql('hostmaster\.awesome.example.com.')
136
- soa.serial.should eql(2007120710)
137
- soa.refresh_time.should eql(86400)
138
- soa.retry_time.should eql(86400)
139
- soa.expiry_time.should eql(2419200)
140
- soa.nxttl.should eql(3600)
130
+ expect(soa.klass).to eq('IN')
131
+ expect(soa.ttl).to eq(86400)
132
+ expect(soa.nameserver).to eq('ns.example.com.')
133
+ expect(soa.responsible_party).to eq('hostmaster\.awesome.example.com.')
134
+ expect(soa.serial).to eq(2007120710)
135
+ expect(soa.refresh_time).to eq(86400)
136
+ expect(soa.retry_time).to eq(86400)
137
+ expect(soa.expiry_time).to eq(2419200)
138
+ expect(soa.nxttl).to eq(3600)
141
139
  end
142
140
 
143
141
  it "should build the correct number of resource records" do
144
142
  zone = DNS::Zonefile.parse(@zonefile)
145
- zone.rr.size.should be(49)
143
+ expect(zone.rr.size).to eq(49)
146
144
  end
147
145
 
148
146
  it "should build the correct NS records" do
149
147
  zone = DNS::Zonefile.load(@zonefile)
150
148
  ns_records = zone.records_of DNS::Zonefile::NS
151
- ns_records.size.should be(2)
149
+ expect(ns_records.size).to eq(2)
152
150
 
153
- ns_records.detect { |ns|
151
+ expect(ns_records.detect { |ns|
154
152
  ns.host == "example.com." && ns.nameserver == "ns.example.com."
155
- }.should_not be_nil
153
+ }).to_not be_nil
156
154
 
157
- ns_records.detect { |ns|
155
+ expect(ns_records.detect { |ns|
158
156
  ns.host == "example.com." && ns.nameserver == "ns.somewhere.com." && ns.ttl == 86400
159
- }.should_not be_nil
157
+ }).to_not be_nil
160
158
  end
161
159
 
162
160
  it "should build the correct A records" do
163
161
  zone = DNS::Zonefile.load(@zonefile)
164
162
  a_records = zone.records_of DNS::Zonefile::A
165
- a_records.size.should be(13)
163
+ expect(a_records.size).to eq(13)
166
164
 
167
- a_records.detect { |a|
165
+ expect(a_records.detect { |a|
168
166
  a.host == "example.com." && a.address == "10.0.0.1"
169
- }.should_not be_nil
167
+ }).to_not be_nil
170
168
 
171
- a_records.detect { |a|
169
+ expect(a_records.detect { |a|
172
170
  a.host == "example.com." && a.address == "10.0.0.11"
173
- }.should_not be_nil
171
+ }).to_not be_nil
174
172
 
175
- a_records.detect { |a|
173
+ expect(a_records.detect { |a|
176
174
  a.host == "example.com." && a.address == "10.0.0.12"
177
- }.should_not be_nil
175
+ }).to_not be_nil
178
176
 
179
- a_records.detect { |a|
177
+ expect(a_records.detect { |a|
180
178
  a.host == "ns.example.com." && a.address == "10.0.0.2" && a.ttl == 86400
181
- }.should_not be_nil
179
+ }).to_not be_nil
182
180
 
183
- a_records.detect { |a|
181
+ expect(a_records.detect { |a|
184
182
  a.host == "ns.example.com." && a.address == "10.0.0.21" && a.ttl == 60
185
- }.should_not be_nil
183
+ }).to_not be_nil
186
184
 
187
- a_records.detect { |a|
185
+ expect(a_records.detect { |a|
188
186
  a.host == "*.example.com." && a.address == "10.0.0.100"
189
- }.should_not be_nil
187
+ }).to_not be_nil
190
188
 
191
- a_records.detect { |a|
189
+ expect(a_records.detect { |a|
192
190
  a.host == "*.sub.example.com." && a.address == "10.0.0.101"
193
- }.should_not be_nil
191
+ }).to_not be_nil
194
192
 
195
- a_records.detect { |a|
193
+ expect(a_records.detect { |a|
196
194
  a.host == "with-class.example.com." && a.address == "10.0.0.3" && a.ttl == 86400
197
- }.should_not be_nil
195
+ }).to_not be_nil
198
196
 
199
- a_records.detect { |a|
197
+ expect(a_records.detect { |a|
200
198
  a.host == "with-ttl.example.com." && a.address == "10.0.0.5" && a.ttl == 60
201
- }.should_not be_nil
199
+ }).to_not be_nil
202
200
 
203
- a_records.detect { |a|
201
+ expect(a_records.detect { |a|
204
202
  a.host == "with-age.example.com." && a.address == "10.0.0.7" && a.ttl == 60
205
- }.should_not be_nil
203
+ }).to_not be_nil
206
204
 
207
- a_records.detect { |a|
205
+ expect(a_records.detect { |a|
208
206
  a.host == "ttl-class.example.com." && a.address == "10.0.0.6" && a.ttl == 60
209
- }.should_not be_nil
207
+ }).to_not be_nil
210
208
 
211
- a_records.detect { |a|
209
+ expect(a_records.detect { |a|
212
210
  a.host == "test.example.com." && a.address == "10.1.0.1" && a.ttl == 3600
213
- }.should_not be_nil
211
+ }).to_not be_nil
214
212
 
215
- a_records.detect { |a|
213
+ expect(a_records.detect { |a|
216
214
  a.host == "www.test.example.com." && a.address == "10.1.0.2" && a.ttl == 3600
217
- }.should_not be_nil
215
+ }).to_not be_nil
218
216
  end
219
217
 
220
218
  it "should build the correct CNAME records" do
221
219
  zone = DNS::Zonefile.load(@zonefile)
222
220
  cname_records = zone.records_of DNS::Zonefile::CNAME
223
- cname_records.size.should be(9)
221
+ expect(cname_records.size).to eq(9)
224
222
 
225
- cname_records.detect { |cname|
223
+ expect(cname_records.detect { |cname|
226
224
  cname.host == "www.example.com." && cname.target == "ns.example.com."
227
- }.should_not be_nil
225
+ }).to_not be_nil
228
226
 
229
- cname_records.detect { |cname|
227
+ expect(cname_records.detect { |cname|
230
228
  cname.host == "wwwtest.example.com." && cname.domainname == "www.example.com."
231
- }.should_not be_nil
229
+ }).to_not be_nil
232
230
 
233
- cname_records.detect { |cname|
231
+ expect(cname_records.detect { |cname|
234
232
  cname.host == "www2.example.com." && cname.domainname == "ns.example.com." && cname.ttl == 86400
235
- }.should_not be_nil
233
+ }).to_not be_nil
236
234
 
237
- cname_records.detect { |cname|
235
+ expect(cname_records.detect { |cname|
238
236
  cname.host == "P229392922.example.com." && cname.domainname == "printer01.ad.example.com." && cname.ttl == 172800
239
- }.should_not be_nil
237
+ }).to_not be_nil
240
238
 
241
239
  eam_records = cname_records.select { |c| c.host =~ /eam\./ }
242
240
 
243
- eam_records.should have(5).records
241
+ expect(eam_records.length).to eq(5)
244
242
 
245
243
  eam_records.each { |cname|
246
- cname.target.should == "www.example.com."
244
+ expect(cname.target).to eq("www.example.com.")
247
245
  }
248
246
 
249
247
  r = eam_records.group_by { |c| c.ttl }
250
- (r[900] || []).should have(3).records
251
- (r[86400] || []).should have(2).records
248
+ expect(r[900].length).to eq(3)
249
+ expect(r[86400].length).to eq(2)
252
250
  end
253
251
 
254
252
  it "should build the correct MX records" do
255
253
  zone = DNS::Zonefile.load(@zonefile)
256
254
  mx_records = zone.records_of DNS::Zonefile::MX
257
- mx_records.size.should be(4)
255
+ expect(mx_records.length).to eq(4)
258
256
 
259
- mx_records.detect { |mx|
257
+ expect(mx_records.detect { |mx|
260
258
  mx.host == "example.com." && mx.priority == 10 && mx.exchanger == 'mail.example.com.'
261
- }.should_not be_nil
259
+ }).to_not be_nil
262
260
 
263
- mx_records.detect { |mx|
261
+ expect(mx_records.detect { |mx|
264
262
  mx.host == "example.com." && mx.priority == 20 && mx.exchange == 'mail2.example.com.'
265
- }.should_not be_nil
263
+ }).to_not be_nil
266
264
 
267
- mx_records.detect { |mx|
265
+ expect(mx_records.detect { |mx|
268
266
  mx.host == "example.com." && mx.priority == 50 && mx.domainname == 'mail3.example.com.' && mx.ttl == 86400
269
- }.should_not be_nil
267
+ }).to_not be_nil
270
268
 
271
- mx_records.detect { |mx|
269
+ expect(mx_records.detect { |mx|
272
270
  mx.host == "test.example.com." && mx.priority == 10 && mx.domainname == 'mail.example.com.' && mx.ttl == 3600
273
- }.should_not be_nil
271
+ }).to_not be_nil
274
272
  end
275
273
 
276
274
  it "should build the correct AAAA records" do
277
275
  zone = DNS::Zonefile.load(@zonefile)
278
276
  aaaa_records = zone.records_of DNS::Zonefile::AAAA
279
- aaaa_records.size.should be(4)
277
+ expect(aaaa_records.length).to eq(4)
280
278
 
281
- aaaa_records.detect { |a|
279
+ expect(aaaa_records.detect { |a|
282
280
  a.host == "example.com." && a.address == "2001:db8:a::1"
283
- }.should_not be_nil
281
+ }).to_not be_nil
284
282
 
285
- aaaa_records.detect { |a|
283
+ expect(aaaa_records.detect { |a|
286
284
  a.host == "ns.example.com." && a.address == "2001:db8:b::1"
287
- }.should_not be_nil
285
+ }).to_not be_nil
288
286
 
289
- aaaa_records.detect { |a|
287
+ expect(aaaa_records.detect { |a|
290
288
  a.host == "mail.example.com." && a.address == "2001:db8:c::10.0.0.4" && a.ttl == 86400
291
- }.should_not be_nil
289
+ }).to_not be_nil
292
290
 
293
- aaaa_records.detect { |a|
291
+ expect(aaaa_records.detect { |a|
294
292
  a.host == "with-age-aaaa.example.com." && a.address == "10.0.0.8" && a.ttl == 60
295
- }.should_not be_nil
293
+ }).to_not be_nil
296
294
 
297
295
  end
298
296
 
299
297
  it "should build the correct NAPTR records" do
300
298
  zone = DNS::Zonefile.load(@zonefile)
301
299
  naptr_records = zone.records_of DNS::Zonefile::NAPTR
302
- naptr_records.size.should be(2)
300
+ expect(naptr_records.length).to eq(2)
303
301
 
304
- naptr_records.detect { |r|
302
+ expect(naptr_records.detect { |r|
305
303
  r.host == "sip.example.com." && r.data == '100 10 "U" "E2U+sip" "!^.*$!sip:cs@example.com!i" .'
306
- }.should_not be_nil
304
+ }).to_not be_nil
307
305
 
308
- naptr_records.detect { |r|
306
+ expect(naptr_records.detect { |r|
309
307
  r.host == "sip2.example.com." && r.data == %q{100 10 "" "" "/urn:cid:.+@([^\\.]+\\.)(.*)$/\\2/i" .} && r.ttl == 86400
310
- }.should_not be_nil
308
+ }).to_not be_nil
311
309
  end
312
310
 
313
311
  it "should build the correct SRV records" do
314
312
  zone = DNS::Zonefile.load(@zonefile)
315
313
  srv_records = zone.records_of DNS::Zonefile::SRV
316
- srv_records.size.should be(7)
314
+ expect(srv_records.length).to eq(7)
317
315
 
318
- srv_records.detect { |r|
316
+ expect(srv_records.detect { |r|
319
317
  r.host == "_xmpp-server._tcp.example.com." && r.priority == 5 && r.weight == 0 && r.port == 5269 && r.target == 'xmpp-server.l.google.com.' && r.ttl == 86400
320
- }.should_not be_nil
318
+ }).to_not be_nil
321
319
 
322
- srv_records.detect { |r|
320
+ expect(srv_records.detect { |r|
323
321
  r.host == "_ldap._tcp.pupy._sites.dc._msdcs.example.com." && r.priority == 0 && r.weight == 100 && r.port == 389 && r.target == 'host01.ad.example.com.' && r.ttl == 600
324
- }.should_not be_nil
322
+ }).to_not be_nil
325
323
 
326
324
  eam_records = srv_records.select { |s| s.host =~ /eam\./ }
327
- eam_records.should have(5).records
325
+ expect(eam_records.length).to eq(5)
328
326
  eam_records.each { |srv|
329
- srv.target.should == "www.example.com."
330
- srv.priority.should == 5
331
- srv.port.should == 5269
332
- srv.weight.should == 0
327
+ expect(srv.target).to eq("www.example.com.")
328
+ expect(srv.priority).to eq(5)
329
+ expect(srv.port).to eq(5269)
330
+ expect(srv.weight).to eq(0)
333
331
  }
334
332
 
335
333
  r = eam_records.group_by { |c| c.ttl }
336
- (r[900] || []).should have(3).records
337
- (r[86400] || []).should have(2).records
334
+ expect(r[900].length).to eq(3)
335
+ expect(r[86400].length).to eq(2)
338
336
  end
339
337
 
340
338
  it "should build the correct TXT records" do
341
339
  zone = DNS::Zonefile.load(@zonefile)
342
340
  txt_records = zone.records_of DNS::Zonefile::TXT
343
- txt_records.size.should be(6)
341
+ expect(txt_records.size).to eq(6)
344
342
 
345
- txt_records.detect { |r|
343
+ expect(txt_records.detect { |r|
346
344
  r.host == "_domainkey.example.com." && r.data == '"v=DKIM1\;g=*\;k=rsa\; p=4tkw1bbkfa0ahfjgnbewr2ttkvahvfmfizowl9s4g0h28io76ndow25snl9iumpcv0jwxr2k"'
347
- }.should_not be_nil
345
+ }).to_not be_nil
348
346
 
349
- txt_records.detect { |r|
347
+ expect(txt_records.detect { |r|
350
348
  r.host == "with_ms_txt.example.com." && r.data == '"Some text"'
351
- }.should_not be_nil
349
+ }).to_not be_nil
352
350
 
353
- txt_records.detect { |r|
351
+ expect(txt_records.detect { |r|
354
352
  r.host == "example.com." && r.data == '"some other \"message\" goes here"' && r.ttl == 86400
355
- }.should_not be_nil
353
+ }).to_not be_nil
356
354
 
357
- txt_records.detect { |r|
355
+ expect(txt_records.detect { |r|
358
356
  r.host == "long.example.com." && r.data == '"a multi-segment TXT record" "usually used for really long TXT records" "since each segment can only span 255 chars"'
359
- }.should_not be_nil
357
+ }).to_not be_nil
360
358
 
361
- txt_records.detect { |r|
359
+ expect(txt_records.detect { |r|
362
360
  r.host == "unquoted.example.com." && r.data == 'some text data'
363
- }.should_not be_nil
361
+ }).to_not be_nil
364
362
 
365
- txt_records.detect { |r|
363
+ expect(txt_records.detect { |r|
366
364
  r.host == "multiline.example.com." && r.data == "\"A TXT record\nsplit across multiple lines\nwith LF and CRLF line endings\""
367
- }.should_not be_nil
365
+ }).to_not be_nil
368
366
  end
369
367
 
370
368
  it "should build the correct SPF records" do
371
369
  zone = DNS::Zonefile.load(@zonefile)
372
370
  spf_records = zone.records_of DNS::Zonefile::SPF
373
- spf_records.size.should be(1)
371
+ expect(spf_records.length).to eq(1)
374
372
 
375
- spf_records.detect { |r|
373
+ expect(spf_records.detect { |r|
376
374
  r.host == "example.com." && r.data == '"v=spf1 a a:other.domain.com ~all"' && r.ttl == 86400
377
- }.should_not be_nil
375
+ }).to_not be_nil
378
376
  end
379
377
 
380
378
  it "should build the correct PTR records" do
381
379
  zone = DNS::Zonefile.load(@zonefile)
382
380
  ptr_records = zone.records_of DNS::Zonefile::PTR
383
- ptr_records.size.should be(1)
381
+ expect(ptr_records.length).to eq(1)
384
382
 
385
- ptr_records.detect { |r|
383
+ expect(ptr_records.detect { |r|
386
384
  r.host == "45.example.com." && r.target == 'example.com.' && r.ttl == 86400
387
- }.should_not be_nil
385
+ }).to_not be_nil
388
386
  end
389
387
  end
390
388
 
@@ -401,15 +399,15 @@ ZONE
401
399
  it "should parse the SOA record correctly" do
402
400
  zone = DNS::Zonefile.load(@zonefile)
403
401
  soa = zone.soa
404
- soa.klass.should eql('IN')
405
- soa.ttl.should eql(86400)
406
- soa.nameserver.should eql('ns0.example.com.')
407
- soa.responsible_party.should eql('hostmaster.example.com.')
408
- soa.serial.should eql(2006010558)
409
- soa.refresh_time.should eql(43200)
410
- soa.retry_time.should eql(3600)
411
- soa.expiry_time.should eql(1209600)
412
- soa.nxttl.should eql(180)
402
+ expect(soa.klass).to eql('IN')
403
+ expect(soa.ttl).to eql(86400)
404
+ expect(soa.nameserver).to eql('ns0.example.com.')
405
+ expect(soa.responsible_party).to eql('hostmaster.example.com.')
406
+ expect(soa.serial).to eql(2006010558)
407
+ expect(soa.refresh_time).to eql(43200)
408
+ expect(soa.retry_time).to eql(3600)
409
+ expect(soa.expiry_time).to eql(1209600)
410
+ expect(soa.nxttl).to eql(180)
413
411
  end
414
412
  end
415
413
 
@@ -429,9 +427,9 @@ ZONE
429
427
  it "should parse the SOA record correctly" do
430
428
  zone = DNS::Zonefile.load(@zonefile)
431
429
  soa = zone.soa
432
- soa.klass.should eql('IN')
433
- soa.nameserver.should eql('ns.domain.example.com.')
434
- soa.responsible_party.should eql('.')
430
+ expect(soa.klass).to eql('IN')
431
+ expect(soa.nameserver).to eql('ns.domain.example.com.')
432
+ expect(soa.responsible_party).to eql('.')
435
433
  end
436
434
  end
437
435
  end