Sha256: dd70950e3cd316fbadb4ca371402f32369ce239388826329271d5d3c05035c22
Contents?: true
Size: 509 Bytes
Versions: 1
Compression:
Stored size: 509 Bytes
Contents
require 'hosts_file/parser' describe HostsFile::Parser do it "should parse" do @parser = HostsFile::Parser.new("1.1.1.1 hostname\n2.2.2.2 hostname2") @parser.collect {|h| h}.length.should eql(2) end it "should not parse comments" do @parser = HostsFile::Parser.new("#1.1.1.1 hostname") @parser.collect {|h| h}.length.should eql(0) end it "should not parse invalid lines" do @parser = HostsFile::Parser.new("1.1.1.1") @parser.collect {|h| h}.length.should eql(0) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hosts_file-0.0.1 | spec/hosts_file/parser_spec.rb |