Sha256: 28c051671c26a3ed121a007f50373a1ac52281882588e64837755354e06ae668

Contents?: true

Size: 391 Bytes

Versions: 4

Compression:

Stored size: 391 Bytes

Contents

require 'spec_helper'
require 'nmap/xml/uptime'

describe Nmap::XML::Uptime do
  describe "#to_s" do
    let(:seconds)   { 920430 }
    let(:last_boot) { Time.parse("2013-07-10 08:34:03 -0700") }

    subject { described_class.new(seconds,last_boot) }

    it "should convert the uptipe to a String" do
      expect(subject.to_s).to eq("uptime: #{seconds} (#{last_boot})")
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

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