Sha256: cb765f63f82c3884fd7e214c75c317eec7adece59e9bae26e36a20b9e3d101fd

Contents?: true

Size: 804 Bytes

Versions: 13

Compression:

Stored size: 804 Bytes

Contents

require 'spec_helper'

describe 'firewall', :type => :class do
  context 'kernel => Linux' do
    let(:facts) {{ :kernel => 'Linux' }}
    it { should contain_class('firewall::linux').with_ensure('running') }
  end

  context 'kernel => Windows' do
    let(:facts) {{ :kernel => 'Windows' }}
    it { expect { should include_class('firewall::linux') }.to raise_error(Puppet::Error) }
  end

  context 'ensure => stopped' do
    let(:facts) {{ :kernel => 'Linux' }}
    let(:params) {{ :ensure => 'stopped' }}
    it { should contain_class('firewall::linux').with_ensure('stopped') }
  end

  context 'ensure => test' do
    let(:facts) {{ :kernel => 'Linux' }}
    let(:params) {{ :ensure => 'test' }}
    it { expect { should include_class('firewall::linux') }.to raise_error(Puppet::Error) }
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
freighthop-0.3.3 modules/firewall/spec/unit/classes/firewall_spec.rb
freighthop-0.3.2 modules/firewall/spec/unit/classes/firewall_spec.rb
freighthop-0.3.1 modules/firewall/spec/unit/classes/firewall_spec.rb
freighthop-0.3.0 modules/firewall/spec/unit/classes/firewall_spec.rb
freighthop-0.2.1 modules/firewall/spec/unit/classes/firewall_spec.rb
freighthop-0.2.0 modules/firewall/spec/unit/classes/firewall_spec.rb
freighthop-0.1.0 modules/firewall/spec/unit/classes/firewall_spec.rb
freighthop-0.0.6 modules/firewall/spec/unit/classes/firewall_spec.rb
freighthop-0.0.5 modules/firewall/spec/unit/classes/firewall_spec.rb
freighthop-0.0.4 modules/firewall/spec/unit/classes/firewall_spec.rb
freighthop-0.0.3 modules/firewall/spec/unit/classes/firewall_spec.rb
freighthop-0.0.2 modules/firewall/spec/unit/classes/firewall_spec.rb
freighthop-0.0.1 modules/firewall/spec/unit/classes/firewall_spec.rb