Sha256: 23b6f3cb19eb4c701127d227bb1b929cebfd73713f83c2f9364608572a742108

Contents?: true

Size: 651 Bytes

Versions: 1

Compression:

Stored size: 651 Bytes

Contents

require 'spec_helper'
require 'nmap/traceroute'

describe Traceroute do
  subject { @xml.hosts.first.traceroute }

  describe "#port" do
    subject { super().port }

    it { should be_kind_of(Integer) }
    it { should be > 0 }
    it { should be < 65535 }
  end

  describe "#protocol" do
    subject { super().protocol }

    it { should be_kind_of(Symbol) }
    it { should be_one_of(:tcp, :udp) }
  end

  describe "#each" do
    subject { super().each.first }

    it { should be_kind_of(Hop) }

    its(:addr) { should be_kind_of(String)  }
    its(:ttl)  { should be_kind_of(String)  }
    its(:rtt)  { should be_kind_of(String)  }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby-nmap-0.7.0 spec/traceroute_spec.rb