Sha256: db1ace041521c823d89c063cb76eda739aa6601d6a82335e1a7d3f966c831d8d
Contents?: true
Size: 920 Bytes
Versions: 2
Compression:
Stored size: 920 Bytes
Contents
require 'tinydns/parser' describe TinyDNS::Parser do it "basic example" do @parser = TinyDNS::Parser.new("=example.com:1.2.3.4:3600") @record = TinyDNS::Record.new( :type => '=', :name => 'example.com', :value => '1.2.3.4', :ttl => "3600" ) @parser.parse.should eq([@record]) end it "edge case" do @parser = TinyDNS::Parser.new(":example.com:1.2.3.4:3600") @record = TinyDNS::Record.new( :type => ':', :name => 'example.com', :value => '1.2.3.4', :ttl => "3600" ) @parser.parse.should eq([@record]) end it "edge case 2" do @parser = TinyDNS::Parser.new("@example.com:1.2.3.4:mail.example.com:3600") @record = TinyDNS::Record.new( :type => '@', :name => 'example.com', :value => '1.2.3.4', :ttl => "mail.example.com", :other => "3600" ) @parser.parse.should eq([@record]) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tinydns-data-0.0.2 | spec/tinydns/parser_spec.rb |
tinydns-data-0.0.1 | spec/tinydns/parser_spec.rb |