Sha256: 104b252a6828f2c6581bb43451ee21132862e590c59a7ce794676e7df7bda5c5

Contents?: true

Size: 770 Bytes

Versions: 6

Compression:

Stored size: 770 Bytes

Contents

require 'spec_helper'

set :os, :family => 'solaris'

describe Serverspec::Type::Port do
  describe port(80) do
    it { should be_listening }

    it('protocol: tcp') { should be_listening.with('tcp') }

    it 'invalid protocol raises error' do
      expect {
        should be_listening.with('not implemented')
      }.to raise_error(ArgumentError, %r/\A`be_listening` matcher doesn\'t support/)
    end

    it('on: 127.0.0.1') do
      should be_listening.on('127.0.0.1')
    end

    it 'invalid local address raises error' do
      expect{ should be_listening.on('') }.to raise_error(ArgumentError)
    end
  end

  describe port('invalid') do
    it { should_not be_listening }
  end

  describe port(123) do
    it { should be_listening.with("udp") }
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
serverspec-2.0.0.beta19 spec/type/solaris/port_spec.rb
serverspec-2.0.0.beta18 spec/type/solaris/port_spec.rb
serverspec-2.0.0.beta17 spec/type/solaris/port_spec.rb
serverspec-2.0.0.beta16 spec/type/solaris/port_spec.rb
serverspec-2.0.0.beta15 spec/type/solaris/port_spec.rb
serverspec-2.0.0.beta14 spec/type/solaris/port_spec.rb