Sha256: 3832d6c822b7643d27e7ae29fa42db00d40f00fb5d3e0a2df6aadb98719ce892
Contents?: true
Size: 654 Bytes
Versions: 4
Compression:
Stored size: 654 Bytes
Contents
require 'spec_helper' require 'nmap/xml/hostname' describe Nmap::XML::Hostname do let(:name) { 'scanme.nmap.org' } describe "#user?" do subject { described_class.new('user', name) } it "should check if type is 'user'" do expect(subject.user?).to eq(true) end end describe "#user?" do subject { described_class.new('PTR', name) } it "should check if type is 'PTR'" do expect(subject.ptr?).to eq(true) end end describe "#to_s" do let(:type) { 'user' } subject { described_class.new(type, name) } it "should return the hostname" do expect(subject.to_s).to eq(name) end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
ruby-nmap-1.0.3 | spec/xml/hostname_spec.rb |
ruby-nmap-1.0.2 | spec/xml/hostname_spec.rb |
ruby-nmap-1.0.1 | spec/xml/hostname_spec.rb |
ruby-nmap-1.0.0 | spec/xml/hostname_spec.rb |