Sha256: 6f639052fd47bd780d053941bc2f2893b5f4198c9303af85243db68c7a51acf8

Contents?: true

Size: 629 Bytes

Versions: 6

Compression:

Stored size: 629 Bytes

Contents

require 'spec_helper'
require 'nmap/scan'

describe Scan do
  let(:type)     { :syn }
  let(:protocol) { :tcp }

  describe "#initialize" do
    subject { described_class.new(type,protocol) }

    it "should accept a type and protocol" do
      expect(subject.type).to eq(type)
      expect(subject.protocol).to eq(protocol)
    end

    it "should default services to []" do
      expect(subject.services).to eq([])
    end
  end

  describe "#to_s" do
    subject { described_class.new(type,protocol) }

    it "should include the type and protocol" do
      expect(subject.to_s).to eq("#{protocol} #{type}")
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

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