Sha256: 4a916a88ecde5da6dfe220d2e9174c8f416f8941d5e9fe207aba9938cf6c45b5

Contents?: true

Size: 545 Bytes

Versions: 4

Compression:

Stored size: 545 Bytes

Contents

require 'spec_helper'
require 'nmap/xml/scanner'

describe Nmap::XML::Scanner do
  describe "#to_s" do
    let(:name)    { 'nmap' }
    let(:version) { '6.01' }
    let(:args)    { 'nmap -v -sS -sU -A -O -oX spec/scan.xml scanme.nmap.org' }
    let(:start_time) { Time.parse('Sat Jul 20 23:55:27 2013') }

    subject do
      described_class.new(
        name,
        version,
        args,
        start_time
      )
    end

    it "should return the scanner command" do
      expect(subject.to_s).to eq("#{name} #{args}")
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ruby-nmap-1.0.3 spec/xml/scanner_spec.rb
ruby-nmap-1.0.2 spec/xml/scanner_spec.rb
ruby-nmap-1.0.1 spec/xml/scanner_spec.rb
ruby-nmap-1.0.0 spec/xml/scanner_spec.rb