Sha256: 949cfc3cb08900fa6d423fe83b8c0a4bb90db9483b091407e4fb87f180fe1b2f
Contents?: true
Size: 625 Bytes
Versions: 4
Compression:
Stored size: 625 Bytes
Contents
require 'spec_helper' require 'nmap/xml/run_stat' describe Nmap::XML::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
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
ruby-nmap-1.0.3 | spec/xml/run_stat_spec.rb |
ruby-nmap-1.0.2 | spec/xml/run_stat_spec.rb |
ruby-nmap-1.0.1 | spec/xml/run_stat_spec.rb |
ruby-nmap-1.0.0 | spec/xml/run_stat_spec.rb |