Sha256: ee0e618264cc277dc3328b71618d79d0482f1c77338788eedb51c55bf63be3c9

Contents?: true

Size: 610 Bytes

Versions: 6

Compression:

Stored size: 610 Bytes

Contents

require 'spec_helper'
require 'nmap/run_stat'

describe RunStat do
  subject { @xml.run_stats.first }

  describe "#to_s" do
    let(:end_time)    { Time.parse('2013-07-21 00:14:33 -0700') }
    let(:elapsed)     { '1145.71' }
    let(:summary) do
      "Nmap done at Sun Jul 21 00:14:33 2013; 1 IP address (1 host up) scanned in 1145.71 seconds"
    end
    let(:exit_status) { 'success' }

    subject { described_class.new(end_time,elapsed,summary,exit_status) }

    it "should convert the RunStat to a String" do
      expect(subject.to_s).to eq("#{end_time} #{elapsed} #{exit_status}")
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ruby-nmap-0.10.0 spec/run_stat_spec.rb
ruby-nmap-0.9.3 spec/run_stat_spec.rb
ruby-nmap-0.9.2 spec/run_stat_spec.rb
ruby-nmap-0.9.1 spec/run_stat_spec.rb
ruby-nmap-0.9.0 spec/run_stat_spec.rb
ruby-nmap-0.8.0 spec/run_stat_spec.rb