Sha256: 5720c1079a329022b3d158550ccf40caceeaefbfb92e6e4add81ed2429096d22

Contents?: true

Size: 708 Bytes

Versions: 1

Compression:

Stored size: 708 Bytes

Contents

require 'spec_helper'

describe Specinfra::Command::Base do
  describe '#check_listening' do
    let(:port) { 80 }
    let(:options) { {} }
    subject { described_class.new.check_listening(port, options) }

    it { should_not be_empty }
    it { should start_with('netstat') }
    it { should include(':80') }
    it { should be_a_kind_of(String) }

    context 'with protocol' do
      let(:protocol) { 'tcp' }
      let(:options) { {:protocol => protocol} }

      it { should include(protocol) }
    end

    context 'with local_address' do
      let(:local_address) { '127.0.0.1' }
      let(:options) { {:local_address => local_address} }

      it { should include(local_address) }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
specinfra-2.0.0.beta6 spec/command/base.rb