Sha256: 2c57c1c5dd6fabbc043356bb104a7d2f960ff4f361cf42e183411e0428ee0ffd
Contents?: true
Size: 803 Bytes
Versions: 1
Compression:
Stored size: 803 Bytes
Contents
require 'spec_helper' require 'amass/parsers/txt' describe Amass::Parsers::TXT do describe ".parse" do let(:line) { "wbldr2.example.com" } let(:io) { StringIO.new(line + $/) } it "must parse each line and yield Amass::Hostname objects" do yielded_hostnames = [] subject.parse(io) do |hostname| yielded_hostnames << hostname end expect(yielded_hostnames.length).to eq(1) expect(yielded_hostnames.first).to be_kind_of(Amass::Hostname) yielded_hostname = yielded_hostnames.first expect(yielded_hostname.name).to eq(line) expect(yielded_hostname.domain).to be(nil) expect(yielded_hostname.addresses).to eq([]) expect(yielded_hostname.tag).to be(nil) expect(yielded_hostname.sources).to eq([]) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ruby-amass-0.1.0 | spec/parsers/txt_spec.rb |